with_items should not be used any more - using loop instead (#47364)
This commit is contained in:
parent
0957b37721
commit
1c8f5c7db5
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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'}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue