with_items should not be used any more - using loop instead (#47652)

This commit is contained in:
Petr Ruzicka 2018-12-14 17:17:21 +01:00 committed by Sam Doran
parent 90a6771bc8
commit 0957b37721
11 changed files with 11 additions and 11 deletions

View file

@ -49,7 +49,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
not_after_date: "{{ item.not_after }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?name=='web-cert-01']"
- debug: var=not_after_date

View file

@ -49,7 +49,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
domain_ttl: "{{ item.ttl }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?name=='example.com']"
- debug: var=domain_ttl

View file

@ -62,7 +62,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
distribution_name: "{{ item.distribution }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?slug=='coreos-beta']"
- debug: var=distribution_name

View file

@ -49,7 +49,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
load_balancer_name: "{{ item.name }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?id=='4de7ac8b-495b-4884-9a69-1050c6793cd6']"
- debug: var=load_balancer_name

View file

@ -41,7 +41,7 @@ EXAMPLES = '''
- debug: var=resp_out
- set_fact:
region_slug: "{{ item.name }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?slug==`nyc1`]"
- debug: var=region_slug

View file

@ -41,7 +41,7 @@ EXAMPLES = '''
- debug: var=resp_out
- set_fact:
size_slug: "{{ item.slug }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?vcpus==`1`]"
- debug: var=size_slug

View file

@ -73,7 +73,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
snapshot_id: "{{ item.id }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?name=='big-data-snapshot1']"
- debug: var=snapshot_id

View file

@ -36,7 +36,7 @@ EXAMPLES = '''
- set_fact:
pubkey: "{{ item.public_key }}"
with_items: "{{ ssh_keys|json_query(ssh_pubkey) }}"
loop: "{{ ssh_keys|json_query(ssh_pubkey) }}"
vars:
ssh_pubkey: "[?name=='ansible_ctrl']"

View file

@ -65,7 +65,7 @@ EXAMPLES = '''
name: "{{ item }}"
resource_id: "73333005"
state: present
with_items:
loop:
- staging
- dbserver

View file

@ -49,7 +49,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
resources: "{{ item.resources }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?name=='extra_awesome_tag']"
- debug: var=resources

View file

@ -52,7 +52,7 @@ EXAMPLES = '''
register: resp_out
- set_fact:
volume_id: "{{ item.id }}"
with_items: "{{ resp_out.data|json_query(name) }}"
loop: "{{ resp_out.data|json_query(name) }}"
vars:
name: "[?name=='nyc3-test-volume']"
- debug: var=volume_id