Fix bare variable references in docs

This commit is contained in:
Andrew Gaffney 2016-11-10 10:12:03 -07:00 committed by Matt Clay
parent c6b08ca623
commit a8d80f7165
11 changed files with 17 additions and 17 deletions

View file

@ -45,7 +45,7 @@ EXAMPLES = '''
- action:
module: debug
msg: "{{ item.dns_name }}"
with_items: elb_facts.elbs
with_items: "{{ elb_facts.elbs }}"
# Gather facts about a particular ELB
- action:
@ -68,7 +68,7 @@ EXAMPLES = '''
- action:
module: debug
msg: "{{ item.dns_name }}"
with_items: elb_facts.elbs
with_items: "{{ elb_facts.elbs }}"
'''

View file

@ -159,7 +159,7 @@ EXAMPLES = '''
- name: Add new instance to host group
add_host: hostname={{ item['ips'][0].public_ip }} groupname=azure_vms
with_items: azure.deployment.instances
with_items: "{{ azure.deployment.instances }}"
- hosts: azure_vms
user: devopscle

View file

@ -97,7 +97,7 @@ EXAMPLES = '''
# Gather information about network managed by 'libvirt' remotely using uri
- virt_net: command=info uri='{{ item }}'
with_items: libvirt_uris
with_items: "{{ libvirt_uris }}"
register: networks
# Ensure that a network is active (needs to be defined and built first)

View file

@ -108,7 +108,7 @@ EXAMPLES = '''
# Gather information about pools managed by 'libvirt' remotely using uri
- virt_pool: command=info uri='{{ item }}'
with_items: libvirt_uris
with_items: "{{ libvirt_uris }}"
register: storage_pools
# Ensure that a pool is active (needs to be defined and built first)

View file

@ -51,7 +51,7 @@ smartos_image_facts:
debug: msg="{{ smartos_images[item]['name'] }}-{{smartos_images[item]['version'] }}
has {{ smartos_images[item]['clones'] }} VM(s)"
with_items: smartos_images.keys()
with_items: "{{ smartos_images.keys() }}"
'''
RETURN = '''

View file

@ -61,7 +61,7 @@ EXAMPLES = '''
username: "{{ esxi_username }}"
password: "{{ site_password }}"
cluster_uuid: "{{ vsan_cluster.cluster_uuid }}"
with_items: groups['esxi'][1:]
with_items: "{{ groups['esxi'][1:] }}"
'''

View file

@ -42,7 +42,7 @@ EXAMPLES = '''
- name: Print running VMs
debug: msg="{{ item }}"
with_items: xs_vms.keys()
with_items: "{{ xs_vms.keys() }}"
when: xs_vms[item]['power_state'] == "Running"
TASK: [Print running VMs] ***********************************************************

View file

@ -37,7 +37,7 @@ EXAMPLES = '''
- name: Print each switch/port
debug: msg="{{ lldp[item]['chassis']['name'] }} / {{ lldp[item]['port']['ifalias'] }}
with_items: lldp.keys()
with_items: "{{ lldp.keys() }}"
# TASK: [Print each switch/port] ***********************************************************
# ok: [10.13.0.22] => (item=eth2) => {"item": "eth2", "msg": "switch1.example.com / Gi0/24"}

View file

@ -60,7 +60,7 @@ EXAMPLES = """
room_token: <hall room integration token>
title: Server Creation
msg: "Created EC2 instance {{ item.id }} of type {{ item.instance_type }}.\\nInstance can be reached at {{ item.public_ip }} in the {{ item.region }} region."
with_items: ec2.instances
with_items: "{{ ec2.instances }}"
"""
HALL_API_ENDPOINT = 'https://hall.com/api/1/services/generic/%s'

View file

@ -78,7 +78,7 @@ EXAMPLES = '''
- name: Add the 'discard' option to any existing options for all devices
crypttab: name={{ item.device }} state=opts_present opts=discard
with_items: ansible_mounts
with_items: "{{ ansible_mounts }}"
when: '/dev/mapper/luks-' in {{ item.device }}
'''

View file

@ -218,7 +218,7 @@ EXAMPLES = '''
register: my_jenkins_plugin_unversioned
when: >
'version' not in item.value
with_dict: my_jenkins_plugins
with_dict: "{{ my_jenkins_plugins }}"
- name: Install plugins with a specific version
jenkins_plugin:
@ -227,7 +227,7 @@ EXAMPLES = '''
register: my_jenkins_plugin_versioned
when: >
'version' in item.value
with_dict: my_jenkins_plugins
with_dict: "{{ my_jenkins_plugins }}"
- name: Initiate the fact
set_fact:
@ -237,13 +237,13 @@ EXAMPLES = '''
set_fact:
jenkins_restart_required: yes
when: item.changed
with_items: my_jenkins_plugin_versioned.results
with_items: "{{ my_jenkins_plugin_versioned.results }}"
- name: Check if restart is required by any of the unversioned plugins
set_fact:
jenkins_restart_required: yes
when: item.changed
with_items: my_jenkins_plugin_unversioned.results
with_items: "{{ my_jenkins_plugin_unversioned.results }}"
- name: Restart Jenkins if required
service:
@ -276,7 +276,7 @@ EXAMPLES = '''
state: "{{ 'pinned' if item.value['pinned'] else 'unpinned'}}"
when: >
'pinned' in item.value
with_dict: my_jenkins_plugins
with_dict: "{{ my_jenkins_plugins }}"
- name: Plugin enabling
jenkins_plugin:
@ -284,7 +284,7 @@ EXAMPLES = '''
state: "{{ 'enabled' if item.value['enabled'] else 'disabled'}}"
when: >
'enabled' in item.value
with_dict: my_jenkins_plugins
with_dict: "{{ my_jenkins_plugins }}"
'''
RETURN = '''