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

This commit is contained in:
Petr Ruzicka 2018-12-14 18:13:32 +01:00 committed by ansibot
parent 0957b37721
commit 1c8f5c7db5
4 changed files with 5 additions and 5 deletions

View file

@ -55,7 +55,7 @@ EXAMPLES = r'''
- set_fact:
category_id: "{{ item.category_id }}"
with_items: "{{ tag_category_results.tag_category_facts|json_query(query) }}"
loop: "{{ tag_category_results.tag_category_facts|json_query(query) }}"
vars:
query: "[?category_name==`Category0001`]"
- debug: var=category_id

View file

@ -112,7 +112,7 @@ EXAMPLES = r'''
esxi_hostname: '{{ inventory_hostname }}'
state: present
delegate_to: localhost
with_items:
loop:
- { 'name': 'NasDS_vol01', 'server': 'nas01', 'path': '/mnt/vol01', 'type': 'nfs'}
- { 'name': 'NasDS_vol02', 'server': 'nas01', 'path': '/mnt/vol02', 'type': 'nfs'}
@ -129,7 +129,7 @@ EXAMPLES = r'''
esxi_hostname: '{{ inventory_hostname }}'
state: present
delegate_to: localhost
with_items:
loop:
- { 'name': 'NasDS_vol03', 'server': 'nas01,nas02', 'path': '/mnt/vol01', 'type': 'nfs41'}
- { 'name': 'NasDS_vol04', 'server': 'nas01,nas02', 'path': '/mnt/vol02', 'type': 'nfs41'}

View file

@ -58,7 +58,7 @@ EXAMPLES = r'''
register: features_set
- set_fact:
ssbd : "{{ item.value }}"
with_items: "{{ features_set.host_feature_facts[esxi_hostname] |json_query(name) }}"
loop: "{{ features_set.host_feature_facts[esxi_hostname] |json_query(name) }}"
vars:
name: "[?key=='cpuid.SSBD']"
- assert:

View file

@ -54,7 +54,7 @@ EXAMPLES = '''
password: "{{ site_password }}"
cluster_uuid: "{{ vsan_cluster.cluster_uuid }}"
delegate_to: localhost
with_items: "{{ groups['esxi'][1:] }}"
loop: "{{ groups['esxi'][1:] }}"
'''
try: