summaryrefslogtreecommitdiff
path: root/inventory
diff options
context:
space:
mode:
authorJan-Piet Mens <jpmens@gmail.com>2013-06-14 11:53:43 +0200
committerJan-Piet Mens <jpmens@gmail.com>2013-06-15 20:54:25 +0200
commit3404a0fc16221faffb65a8024187cff0f5436a3d (patch)
treefb5d3160938d4f253951e583aba45b9ad58bf073 /inventory
parent3c6d5f95f887432639276d5220e52a806fd575e2 (diff)
downloadansible-modules-core-3404a0fc16221faffb65a8024187cff0f5436a3d.tar.gz
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string Added deprecation warning to moduledev.rst and remove deprecated example from it Fixed up a few typos and uppercased some acronyms. add consistency to how EXAMPLES are formatted
Diffstat (limited to 'inventory')
-rw-r--r--inventory/add_host18
-rw-r--r--inventory/group_by12
2 files changed, 18 insertions, 12 deletions
diff --git a/inventory/add_host b/inventory/add_host
index b8204a52..997c8b87 100644
--- a/inventory/add_host
+++ b/inventory/add_host
@@ -19,11 +19,15 @@ options:
- The groups to add the hostname to, comma separated.
required: false
author: Seth Vidal
-examples:
- - description: add host to group 'just_created' with variable foo=42
- code: add_host hostname=${ip_from_ec2} groups=just_created foo=42
- - description: add a host with a non-standard port local to your machines
- code: add_host hostname='${new_ip}:${new_port}'
- - description: add a host alias that we reach through a tunnel
- code: add_host hostname=${new_ip} ansible_ssh_host=${inventory_hostname} ansible_ssh_port=${new_port}'
+'''
+
+EXAMPLES = '''
+# add host to group 'just_created' with variable foo=42
+- 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 a host alias that we reach through a tunnel
+- add_host: hostname=${new_ip} ansible_ssh_host=${inventory_hostname} ansible_ssh_port=${new_port}'
'''
diff --git a/inventory/group_by b/inventory/group_by
index a8e6b835..e2868faa 100644
--- a/inventory/group_by
+++ b/inventory/group_by
@@ -13,11 +13,13 @@ options:
- The variables whose values will be used as groups
required: true
author: Jeroen Hoekx
-examples:
- - description: Create groups based on the machine architecture
- code: group_by key=${ansible_machine}
- - description: Create groups like 'kvm-host'
- code: group_by key=${ansible_virtualization_type}-${ansible_virtualization_role}
notes:
- Spaces in group names are converted to dashes '-'.
'''
+
+EXAMPLES = '''
+# Create groups based on the machine architecture
+- group_by: key=${ansible_machine}
+# Create groups like 'kvm-host'
+- group_by: key=${ansible_virtualization_type}-${ansible_virtualization_role}
+'''