summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Piet Mens <jpmens@gmail.com>2013-06-17 08:53:46 +0200
committerJan-Piet Mens <jpmens@gmail.com>2013-06-17 08:53:46 +0200
commit98c14232690b8c58f2f516a490b422f0a6770919 (patch)
tree6fb02197f38b621e426095529f49e87525bd02de
parent5cbbd2ee6d85031f31aafa23cd608b0a6840468c (diff)
downloadansible-modules-core-98c14232690b8c58f2f516a490b422f0a6770919.tar.gz
Docs: consistently format playbook EXAMPLES
-rw-r--r--cloud/ec26
-rw-r--r--cloud/ec2_vol6
-rw-r--r--cloud/quantum_floating_ip_associate2
-rw-r--r--cloud/quantum_router2
-rw-r--r--cloud/quantum_router_interface7
-rw-r--r--cloud/rax4
-rw-r--r--cloud/virt5
-rw-r--r--commands/shell3
-rw-r--r--database/postgresql_privs18
-rw-r--r--files/fetch8
-rw-r--r--inventory/add_host6
-rw-r--r--messaging/rabbitmq_parameter5
-rw-r--r--monitoring/airbrake_deployment5
-rw-r--r--monitoring/newrelic_deployment5
-rw-r--r--monitoring/pagerduty16
-rw-r--r--monitoring/pingdom12
-rw-r--r--network/get_url2
-rw-r--r--network/uri10
-rw-r--r--notification/campfire4
-rw-r--r--notification/flowdock15
-rw-r--r--notification/hipchat2
-rw-r--r--notification/irc12
-rw-r--r--notification/jabber17
-rw-r--r--notification/mail2
-rw-r--r--notification/mqtt2
-rw-r--r--notification/osx_say2
-rw-r--r--packaging/gem6
-rw-r--r--packaging/homebrew8
-rw-r--r--packaging/rhn_register6
-rw-r--r--utilities/debug6
30 files changed, 130 insertions, 74 deletions
diff --git a/cloud/ec2 b/cloud/ec2
index 90dcd833..e8d6b73e 100644
--- a/cloud/ec2
+++ b/cloud/ec2
@@ -162,7 +162,7 @@ author: Seth Vidal, Tim Gerla, Lester Wade
EXAMPLES = '''
# Basic provisioning example
-local_action:
+- local_action:
module: ec2
keypair: mykey
instance_type: c1.medium
@@ -172,7 +172,7 @@ local_action:
count: 3
# Advanced example with tagging and CloudWatch
-local_action:
+- local_action:
module: ec2
keypair: mykey
group: databases
@@ -184,7 +184,7 @@ local_action:
instance_tags: '{"db":"postgres"}' monitoring=yes'
# VPC example
-local_action:
+- local_action:
module: ec2
keypair: mykey
group_id: sg-1dc53f72
diff --git a/cloud/ec2_vol b/cloud/ec2_vol
index 349863ff..bc9b9b94 100644
--- a/cloud/ec2_vol
+++ b/cloud/ec2_vol
@@ -58,21 +58,21 @@ author: Lester Wade
EXAMPLES = '''
# Simple attachment action
-local_action:
+- local_action:
module: ec2_vol
instance: XXXXXX
volume_size: 5
device_name: sdd
# Playbook example combined with instance launch
-local_action:
+- local_action:
module: ec2
keypair: $keypair
image: $image
wait: yes
count: 3
register: ec2
-local_action:
+- local_action:
module: ec2_vol
instance: ${item.id}
volume_size: 5
diff --git a/cloud/quantum_floating_ip_associate b/cloud/quantum_floating_ip_associate
index 9884aa72..7ea40c15 100644
--- a/cloud/quantum_floating_ip_associate
+++ b/cloud/quantum_floating_ip_associate
@@ -76,7 +76,7 @@ requirements: ["quantumclient", "keystoneclient"]
EXAMPLES = '''
# Associate a specific floating IP with an Instance
-quantum_floating_ip_associate:
+- quantum_floating_ip_associate:
state=present
login_username=admin
login_password=admin
diff --git a/cloud/quantum_router b/cloud/quantum_router
index 74df17d2..3e740900 100644
--- a/cloud/quantum_router
+++ b/cloud/quantum_router
@@ -79,7 +79,7 @@ requirements: ["quantumclient", "keystoneclient"]
EXAMPLES = '''
# Creates a router for tenant admin
-quantum_router: state=present
+- quantum_router: state=present
login_username=admin
login_password=admin
login_tenant_name=admin
diff --git a/cloud/quantum_router_interface b/cloud/quantum_router_interface
index 7e7a95d9..dfc01e29 100644
--- a/cloud/quantum_router_interface
+++ b/cloud/quantum_router_interface
@@ -79,8 +79,11 @@ requirements: ["quantumclient", "keystoneclient"]
EXAMPLES = '''
# Attach tenant1's subnet to the external router
- quantum_router_interface: state=present login_username=admin
- login_password=admin login_tenant_name=admin
- tenant_name=tenant1 router_name=external_route subnet_name=t1subnet
+ login_password=admin
+ login_tenant_name=admin
+ tenant_name=tenant1
+ router_name=external_route
+ subnet_name=t1subnet
'''
diff --git a/cloud/rax b/cloud/rax
index 24dd9670..f2ffec48 100644
--- a/cloud/rax
+++ b/cloud/rax
@@ -83,8 +83,8 @@ notes:
'''
EXAMPLES = '''
-- name: Create a server
- local_action:
+# Create a server
+- local_action:
module: rax
creds_file: ~/.raxpub
service: cloudservers
diff --git a/cloud/virt b/cloud/virt
index 792be96a..69dcf055 100644
--- a/cloud/virt
+++ b/cloud/virt
@@ -71,7 +71,10 @@ ansible host -m virt -a "name=alpha command=create uri=lxc:///"
# a playbook example of defining and launching an LXC guest
tasks:
- name: define vm
- virt: name=foo command=define xml="{{ lookup('template', 'container-template.xml.j2') }}" uri=lxc:///
+ virt: name=foo
+ command=define
+ xml="{{ lookup('template', 'container-template.xml.j2') }}"
+ uri=lxc:///
- name: start vm
virt: name=foo state=running uri=lxc:///
'''
diff --git a/commands/shell b/commands/shell
index ff57b4d4..5b3969a1 100644
--- a/commands/shell
+++ b/commands/shell
@@ -45,6 +45,7 @@ author: Michael DeHaan
'''
EXAMPLES = '''
-# Execute the command in remote shell; stdout goes to the specified file on the remote
+# Execute the command in remote shell; stdout goes to the specified
+# file on the remote
- shell: somescript.sh >> somelog.txt
'''
diff --git a/database/postgresql_privs b/database/postgresql_privs
index 6ab7d08c..89648aca 100644
--- a/database/postgresql_privs
+++ b/database/postgresql_privs
@@ -136,7 +136,7 @@ EXAMPLES = """
# On database "library":
# GRANT SELECT, INSERT, UPDATE ON TABLE public.books, public.authors
# TO librarian, reader WITH GRANT OPTION
-postgresql_privs: >
+- postgresql_privs: >
database=library
state=present
privs=SELECT,INSERT,UPDATE
@@ -147,7 +147,7 @@ postgresql_privs: >
grant_option=yes
# Same as above leveraging default values:
-postgresql_privs: >
+- postgresql_privs: >
db=library
privs=SELECT,INSERT,UPDATE
objs=books,authors
@@ -157,7 +157,7 @@ postgresql_privs: >
# REVOKE GRANT OPTION FOR INSERT ON TABLE books FROM reader
# Note that role "reader" will be *granted* INSERT privilege itself if this
# isn't already the case (since state=present).
-postgresql_privs: >
+- postgresql_privs: >
db=library
state=present
priv=INSERT
@@ -167,7 +167,7 @@ postgresql_privs: >
# REVOKE INSERT, UPDATE ON ALL TABLES IN SCHEMA public FROM reader
# "public" is the default schema. This also works for PostgreSQL 8.x.
-postgresql_privs: >
+- postgresql_privs: >
db=library
state=absent
privs=INSERT,UPDATE
@@ -175,7 +175,7 @@ postgresql_privs: >
role=reader
# GRANT ALL PRIVILEGES ON SCHEMA public, math TO librarian
-postgresql_privs: >
+- postgresql_privs: >
db=library
privs=ALL
type=schema
@@ -184,7 +184,7 @@ postgresql_privs: >
# GRANT ALL PRIVILEGES ON FUNCTION math.add(int, int) TO librarian, reader
# Note the separation of arguments with colons.
-postgresql_privs: >
+- postgresql_privs: >
db=library
privs=ALL
type=function
@@ -195,7 +195,7 @@ postgresql_privs: >
# GRANT librarian, reader TO alice, bob WITH ADMIN OPTION
# Note that group role memberships apply cluster-wide and therefore are not
# restricted to database "library" here.
-postgresql_privs: >
+- postgresql_privs: >
db=library
type=group
objs=librarian,reader
@@ -205,7 +205,7 @@ postgresql_privs: >
# GRANT ALL PRIVILEGES ON DATABASE library TO librarian
# Note that here "db=postgres" specifies the database to connect to, not the
# database to grant privileges on (which is specified via the "objs" param)
-postgresql_privs: >
+- postgresql_privs: >
db=postgres
privs=ALL
type=database
@@ -215,7 +215,7 @@ postgresql_privs: >
# GRANT ALL PRIVILEGES ON DATABASE library TO librarian
# If objs is omitted for type "database", it defaults to the database
# to which the connection is established
-postgresql_privs: >
+- postgresql_privs: >
db=library
privs=ALL
type=database
diff --git a/files/fetch b/files/fetch
index 4e0eae51..bc6ab3ab 100644
--- a/files/fetch
+++ b/files/fetch
@@ -47,14 +47,14 @@ author: Michael DeHaan
EXAMPLES = '''
# Store file into /tmp/fetched/host.example.com/tmp/somefile
-fetch: src=/tmp/somefile dest=/tmp/fetched
+- fetch: src=/tmp/somefile dest=/tmp/fetched
# Specifying a path directly
-fetch: src=/tmp/somefile dest=/tmp/prefix-{{ ansible_hostname }} flat=yes
+- fetch: src=/tmp/somefile dest=/tmp/prefix-{{ ansible_hostname }} flat=yes
# Specifying a destination path
-fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
+- fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
# Storing in a path relative to the playbook
-fetch: src=/tmp/uniquefile dest=special/prefix-{{ ansible_hostname }} flat=yes
+- fetch: src=/tmp/uniquefile dest=special/prefix-{{ ansible_hostname }} flat=yes
'''
diff --git a/inventory/add_host b/inventory/add_host
index 997c8b87..c3085fcd 100644
--- a/inventory/add_host
+++ b/inventory/add_host
@@ -26,8 +26,10 @@ EXAMPLES = '''
- add_host: hostname=${ip_from_ec2} groups=just_created foo=42
# add a host with a non-standard port local to your machines
-- add_host: hostname='${new_ip}:${new_port}'
+- add_host: hostname='${new_ip}:${new_port}'
# add a host alias that we reach through a tunnel
-- add_host: hostname=${new_ip} ansible_ssh_host=${inventory_hostname} ansible_ssh_port=${new_port}'
+- add_host: hostname=${new_ip}
+ ansible_ssh_host=${inventory_hostname}
+ ansible_ssh_port=${new_port}'
'''
diff --git a/messaging/rabbitmq_parameter b/messaging/rabbitmq_parameter
index fe0b2a4f..e7d26d4c 100644
--- a/messaging/rabbitmq_parameter
+++ b/messaging/rabbitmq_parameter
@@ -62,7 +62,10 @@ options:
EXAMPLES = """
# Set the federation parameter 'local_username' to a value of 'guest' (in quotes)
-rabbitmq_parameter: component=federation name=local-username value='"guest"' state=present
+- rabbitmq_parameter: component=federation
+ name=local-username
+ value='"guest"'
+ state=present
"""
class RabbitMqParameter(object):
diff --git a/monitoring/airbrake_deployment b/monitoring/airbrake_deployment
index b9b82c20..8db1752a 100644
--- a/monitoring/airbrake_deployment
+++ b/monitoring/airbrake_deployment
@@ -53,7 +53,10 @@ requirements: [ urllib, urllib2 ]
'''
EXAMPLES = '''
-action: airbrake_deployment token=AAAAAA environment='staging' user='ansible' revision=4.2
+- airbrake_deployment: token=AAAAAA
+ environment='staging'
+ user='ansible'
+ revision=4.2
'''
HAS_URLLIB = True
diff --git a/monitoring/newrelic_deployment b/monitoring/newrelic_deployment
index adfcb4ab..b530b1f8 100644
--- a/monitoring/newrelic_deployment
+++ b/monitoring/newrelic_deployment
@@ -69,7 +69,10 @@ requirements: [ urllib, urllib2 ]
'''
EXAMPLES = '''
-action: newrelic_deployment token=AAAAAA app_name=myapp user='ansible deployment' revision=1.0
+- newrelic_deployment: token=AAAAAA
+ app_name=myapp
+ user='ansible deployment'
+ revision=1.0
'''
HAS_URLLIB = True
diff --git a/monitoring/pagerduty b/monitoring/pagerduty
index 200d45b0..4f79f65b 100644
--- a/monitoring/pagerduty
+++ b/monitoring/pagerduty
@@ -66,13 +66,23 @@ notes:
EXAMPLES='''
# List ongoing maintenance windows.
-pagerduty: name=companyabc user=example@example.com passwd=password123 state=ongoing
+- pagerduty: name=companyabc user=example@example.com passwd=password123 state=ongoing
# Create a 1 hour maintenance window for service FOO123.
-pagerduty: name=companyabc user=example@example.com passwd=password123 state=running service=FOO123"
+- pagerduty: name=companyabc
+ user=example@example.com
+ passwd=password123
+ state=running
+ service=FOO123
# Create a 4 hour maintenance window for service FOO123 with the description "deployment".
-pagerduty: name=companyabc user=example@example.com passwd=password123 state=running service=FOO123 hours=4 desc=deployment"
+- pagerduty: name=companyabc
+ user=example@example.com
+ passwd=password123
+ state=running
+ service=FOO123
+ hours=4
+ desc=deployment
'''
import json
diff --git a/monitoring/pingdom b/monitoring/pingdom
index 5e566e6d..242304af 100644
--- a/monitoring/pingdom
+++ b/monitoring/pingdom
@@ -52,10 +52,18 @@ notes:
EXAMPLES = '''
# Pause the check with the ID of 12345.
-pingdom: uid=example@example.com passwd=password123 key=apipassword123 checkid=12345 state=paused
+- pingdom: uid=example@example.com
+ passwd=password123
+ key=apipassword123
+ checkid=12345
+ state=paused
# Unpause the check with the ID of 12345.
-pingdom: uid=example@example.com passwd=password123 key=apipassword123 checkid=12345 state=running
+- pingdom: uid=example@example.com
+ passwd=password123
+ key=apipassword123
+ checkid=12345
+ state=running
'''
import pingdom
diff --git a/network/get_url b/network/get_url
index 74e908f2..2f13dbec 100644
--- a/network/get_url
+++ b/network/get_url
@@ -81,7 +81,7 @@ author: Jan-Piet Mens
'''
EXAMPLES='''
-get_url: url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
+- get_url: url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
'''
diff --git a/network/uri b/network/uri
index 9b4477e8..5ab0f15d 100644
--- a/network/uri
+++ b/network/uri
@@ -134,26 +134,26 @@ EXAMPLES = '''
- action: uri url=http://www.example.com return_content=yes
register: webpage
- action: fail
+- action: fail
when_string: '"AWESOME" not in "${webpage.content}"'
# Create a JIRA issue.
-action: >
+- action: >
uri url=https://your.jira.example.com/rest/api/2/issue/
method=POST user=your_username password=your_pass
body='$FILE(issue.json)' force_basic_auth=yes
status_code=201 HEADER_Content-Type="application/json"
-action: >
+- action: >
uri url=https://your.form.based.auth.examle.com/index.php
method=POST body="name=your_username&password=your_password&enter=Sign%20in"
status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
-register: login
+ register: login
# Login to a form based webpage, then use the returned cookie to
# access the app in later tasks.
-action: uri url=https://your.form.based.auth.example.com/dashboard.php
+- action: uri url=https://your.form.based.auth.example.com/dashboard.php
method=GET return_content=yes HEADER_Cookie="${login.set_cookie}"
'''
diff --git a/notification/campfire b/notification/campfire
index 348d9aa9..a081a54e 100644
--- a/notification/campfire
+++ b/notification/campfire
@@ -43,9 +43,9 @@ author: Adam Garside <adam.garside@gmail.com>
'''
EXAMPLES = '''
-action: campfire subscription=foo token=12345 room=123 msg="Task completed."
+- campfire: subscription=foo token=12345 room=123 msg="Task completed."
-action: campfire subscription=foo token=12345 room=123 notify=loggins
+- campfire: subscription=foo token=12345 room=123 notify=loggins
msg="Task completed ... with feeling."
'''
diff --git a/notification/flowdock b/notification/flowdock
index 1d09660d..f528e461 100644
--- a/notification/flowdock
+++ b/notification/flowdock
@@ -82,9 +82,18 @@ requirements: [ urllib, urllib2 ]
'''
EXAMPLES = '''
-action: flowdock type=inbox token=AAAAAA from_address=user@example.com source='my cool app' msg='test from ansible' subject='test subject'
-
-action: flowdock type=chat token=AAAAAA external_user_name=testuser msg='test from ansible' tags=tag1,tag2,tag3
+- flowdock: type=inbox
+ token=AAAAAA
+ from_address=user@example.com
+ source='my cool app'
+ msg='test from ansible'
+ subject='test subject'
+
+- flowdock: type=chat
+ token=AAAAAA
+ external_user_name=testuser
+ msg='test from ansible'
+ tags=tag1,tag2,tag3
'''
HAS_URLLIB = True
diff --git a/notification/hipchat b/notification/hipchat
index d1923556..79be892d 100644
--- a/notification/hipchat
+++ b/notification/hipchat
@@ -53,7 +53,7 @@ author: WAKAYAMA Shirou
'''
EXAMPLES = '''
-action: hipchat token=AAAAAA room=notify msg="Ansible task finished"
+- hipchat: token=AAAAAA room=notify msg="Ansible task finished"
'''
# ===========================================
diff --git a/notification/irc b/notification/irc
index 4dfd9b4f..3e457cf4 100644
--- a/notification/irc
+++ b/notification/irc
@@ -63,13 +63,13 @@ author: Jan-Piet Mens
'''
EXAMPLES = '''
-action: irc server=irc.example.net channel="#t1" msg="Hello world"
+- irc: server=irc.example.net channel="#t1" msg="Hello world"
-local_action: irc port=6669
- channel="#t1"
- msg="All finished at {{ ansible_date_time.iso8601 }}"
- color=red
- nick=ansibleIRC
+- local_action: irc port=6669
+ channel="#t1"
+ msg="All finished at {{ ansible_date_time.iso8601 }}"
+ color=red
+ nick=ansibleIRC
'''
# ===========================================
diff --git a/notification/jabber b/notification/jabber
index 9f155265..f0f6d2b5 100644
--- a/notification/jabber
+++ b/notification/jabber
@@ -47,13 +47,24 @@ author: Brian Coca
EXAMPLES = '''
# send a message to a user
-jabber: user=mybot@chatserver.tld password=secret to=friend@chatserver.tld msg="Ansible task finished"
+- jabber: user=mybot@example.net
+ password=secret
+ to=friend@example.net
+ msg="Ansible task finished"
# send a message to a room
-jabber: user=mybot@chatserver.tld password=secret to=mychaps@conference.chatserver.tld/ansiblebot msg="Ansible task finished"
+- jabber: user=mybot@example.net
+ password=secret
+ to=mychaps@conference.example.net/ansiblebot
+ msg="Ansible task finished"
# send a message, specifying the host and port
-jabber user=mybot@chatserver.tld host=talk.chatserver.tld port=5223 password=secret to=mychaps@chatserver.tld msg="Ansible task finished"
+- jabber user=mybot@example.net
+ host=talk.example.net
+ port=5223
+ password=secret
+ to=mychaps@example.net
+ msg="Ansible task finished"
'''
import os
diff --git a/notification/mail b/notification/mail
index 3fe344aa..b3d9dc79 100644
--- a/notification/mail
+++ b/notification/mail
@@ -103,7 +103,7 @@ options:
EXAMPLES = '''
# Example playbook sending mail to root
-local_action: mail msg='System ${ansible_hostname} has been sucessfully provisioned.'
+- local_action: mail msg='System ${ansible_hostname} has been sucessfully provisioned.'
# Send e-mail to a bunch of users, attaching files
- local_action: mail
diff --git a/notification/mqtt b/notification/mqtt
index e30ed4c5..6c460c7b 100644
--- a/notification/mqtt
+++ b/notification/mqtt
@@ -85,7 +85,7 @@ author: Jan-Piet Mens
'''
EXAMPLES = '''
-local_action: mqtt
+- local_action: mqtt
topic=service/ansible/{{ ansible_hostname }}
payload="Hello at {{ ansible_date_time.iso8601 }}"
qos=0
diff --git a/notification/osx_say b/notification/osx_say
index 35f2246d..6976de14 100644
--- a/notification/osx_say
+++ b/notification/osx_say
@@ -41,7 +41,7 @@ author: Michael DeHaan
'''
EXAMPLES = '''
-local_action: osx_say msg="{{inventory_hostname}} is all done" voice=Zarvox
+- local_action: osx_say msg="{{inventory_hostname}} is all done" voice=Zarvox
'''
import subprocess
diff --git a/packaging/gem b/packaging/gem
index 04ea794a..b9621578 100644
--- a/packaging/gem
+++ b/packaging/gem
@@ -60,13 +60,13 @@ author: Johan Wiren
EXAMPLES = '''
# Installs version 1.0 of vagrant.
-gem: name=vagrant version=1.0 state=present
+- gem: name=vagrant version=1.0 state=present
# Installs latest available version of rake.
-gem: name=rake state=latest
+- gem: name=rake state=latest
# Installs rake version 1.0 from a local gem on disk.
-gem: name=rake gem_source=/path/to/gems/rake-1.0.gem state=present
+- gem: name=rake gem_source=/path/to/gems/rake-1.0.gem state=present
'''
import re
diff --git a/packaging/homebrew b/packaging/homebrew
index 0c570645..add06d64 100644
--- a/packaging/homebrew
+++ b/packaging/homebrew
@@ -45,10 +45,10 @@ options:
notes: []
'''
EXAMPLES = '''
-homebrew: name=foo state=present
-homebrew: name=foo state=present update_homebrew=yes
-homebrew: name=foo state=absent
-homebrew: name=foo,bar state=absent
+- homebrew: name=foo state=present
+- homebrew: name=foo state=present update_homebrew=yes
+- homebrew: name=foo state=absent
+- homebrew: name=foo,bar state=absent
'''
diff --git a/packaging/rhn_register b/packaging/rhn_register
index 177f5b7d..0e391a42 100644
--- a/packaging/rhn_register
+++ b/packaging/rhn_register
@@ -48,13 +48,13 @@ options:
EXAMPLES = '''
# Unregister system from RHN.
-- code: rhn_register state=absent username=joe_user password=somepass
+- rhn_register: state=absent username=joe_user password=somepass
# Register as user (joe_user) with password (somepass) and auto-subscribe to available content.
-- code: rhn_register state=present username=joe_user password=somepass
+- rhn_register: state=present username=joe_user password=somepass
# Register with activationkey (1-222333444) and enable extended update support.
-- code: rhn_register state=present activationkey=1-222333444 enable_eus=true
+- rhn_register: state=present activationkey=1-222333444 enable_eus=true
# Register as user (joe_user) with password (somepass) against a satellite
# server specified by (server_url).
diff --git a/utilities/debug b/utilities/debug
index 9d279d62..12e930c7 100644
--- a/utilities/debug
+++ b/utilities/debug
@@ -48,11 +48,11 @@ author: Dag Wieers
EXAMPLES = '''
# Example that prints the loopback address and gateway for each host
-- action: debug msg="System $inventory_hostname has uuid $ansible_product_uuid"
+- debug: msg="System $inventory_hostname has uuid $ansible_product_uuid"
-- action: debug msg="System $inventory_hostname lacks a gateway" fail=yes
+- debug: msg="System $inventory_hostname lacks a gateway" fail=yes
only_if: "is_unset('${ansible_default_ipv4.gateway}')"
-- action: debug msg="System $inventory_hostname has gateway ${ansible_default_ipv4.gateway}"
+- debug: msg="System $inventory_hostname has gateway ${ansible_default_ipv4.gateway}"
only_if: "is_set('${ansible_default_ipv4.gateway}')"
'''