Fix bare variable references in docs

pull/18777/head
Andrew Gaffney 8 years ago committed by Matt Clay
parent c6b08ca623
commit a8d80f7165

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

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

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

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

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

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

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

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

@ -60,7 +60,7 @@ EXAMPLES = """
room_token: <hall room integration token> room_token: <hall room integration token>
title: Server Creation 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." 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' HALL_API_ENDPOINT = 'https://hall.com/api/1/services/generic/%s'

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

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

Loading…
Cancel
Save