From a8d80f71658157e72a0347ca949991a9b552ddf7 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Thu, 10 Nov 2016 10:12:03 -0700 Subject: [PATCH] Fix bare variable references in docs --- .../modules/extras/cloud/amazon/ec2_elb_facts.py | 4 ++-- .../extras/cloud/azure/azure_rm_deployment.py | 2 +- lib/ansible/modules/extras/cloud/misc/virt_net.py | 2 +- lib/ansible/modules/extras/cloud/misc/virt_pool.py | 2 +- .../extras/cloud/smartos/smartos_image_facts.py | 2 +- .../extras/cloud/vmware/vmware_vsan_cluster.py | 2 +- lib/ansible/modules/extras/cloud/xenserver_facts.py | 2 +- lib/ansible/modules/extras/network/lldp.py | 2 +- lib/ansible/modules/extras/notification/hall.py | 2 +- lib/ansible/modules/extras/system/crypttab.py | 2 +- .../extras/web_infrastructure/jenkins_plugin.py | 12 ++++++------ 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py b/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py index 675c55d64c8..a4ccd81c65b 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_elb_facts.py @@ -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 }}" ''' diff --git a/lib/ansible/modules/extras/cloud/azure/azure_rm_deployment.py b/lib/ansible/modules/extras/cloud/azure/azure_rm_deployment.py index 458c5ecb85b..1b2c234f0b5 100644 --- a/lib/ansible/modules/extras/cloud/azure/azure_rm_deployment.py +++ b/lib/ansible/modules/extras/cloud/azure/azure_rm_deployment.py @@ -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 diff --git a/lib/ansible/modules/extras/cloud/misc/virt_net.py b/lib/ansible/modules/extras/cloud/misc/virt_net.py index 469603d1aeb..8b277e439fb 100644 --- a/lib/ansible/modules/extras/cloud/misc/virt_net.py +++ b/lib/ansible/modules/extras/cloud/misc/virt_net.py @@ -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) diff --git a/lib/ansible/modules/extras/cloud/misc/virt_pool.py b/lib/ansible/modules/extras/cloud/misc/virt_pool.py index 11e3447048c..237315bcbd8 100644 --- a/lib/ansible/modules/extras/cloud/misc/virt_pool.py +++ b/lib/ansible/modules/extras/cloud/misc/virt_pool.py @@ -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) diff --git a/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py b/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py index 189389de720..eb3ecd08a3d 100644 --- a/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py +++ b/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py @@ -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 = ''' diff --git a/lib/ansible/modules/extras/cloud/vmware/vmware_vsan_cluster.py b/lib/ansible/modules/extras/cloud/vmware/vmware_vsan_cluster.py index 015386d9064..3f2bad1fa80 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vmware_vsan_cluster.py +++ b/lib/ansible/modules/extras/cloud/vmware/vmware_vsan_cluster.py @@ -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:] }}" ''' diff --git a/lib/ansible/modules/extras/cloud/xenserver_facts.py b/lib/ansible/modules/extras/cloud/xenserver_facts.py index 54a2bd61ec3..04c88d34312 100644 --- a/lib/ansible/modules/extras/cloud/xenserver_facts.py +++ b/lib/ansible/modules/extras/cloud/xenserver_facts.py @@ -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] *********************************************************** diff --git a/lib/ansible/modules/extras/network/lldp.py b/lib/ansible/modules/extras/network/lldp.py index 5d4a78637d5..bb4d38e2003 100644 --- a/lib/ansible/modules/extras/network/lldp.py +++ b/lib/ansible/modules/extras/network/lldp.py @@ -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"} diff --git a/lib/ansible/modules/extras/notification/hall.py b/lib/ansible/modules/extras/notification/hall.py index 7c76e52379f..23f4a0c7446 100755 --- a/lib/ansible/modules/extras/notification/hall.py +++ b/lib/ansible/modules/extras/notification/hall.py @@ -60,7 +60,7 @@ EXAMPLES = """ room_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' diff --git a/lib/ansible/modules/extras/system/crypttab.py b/lib/ansible/modules/extras/system/crypttab.py index ecf207cf03c..d004f8fa4f6 100644 --- a/lib/ansible/modules/extras/system/crypttab.py +++ b/lib/ansible/modules/extras/system/crypttab.py @@ -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 }} ''' diff --git a/lib/ansible/modules/extras/web_infrastructure/jenkins_plugin.py b/lib/ansible/modules/extras/web_infrastructure/jenkins_plugin.py index af5adb462ff..b08f7541a98 100644 --- a/lib/ansible/modules/extras/web_infrastructure/jenkins_plugin.py +++ b/lib/ansible/modules/extras/web_infrastructure/jenkins_plugin.py @@ -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 = '''