|
|
@ -115,7 +115,7 @@
|
|
|
|
- name: test with_subelements
|
|
|
|
- name: test with_subelements
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
with_subelements:
|
|
|
|
with_subelements:
|
|
|
|
- element_data
|
|
|
|
- "{{element_data}}"
|
|
|
|
- the_list
|
|
|
|
- the_list
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify with_subelements results
|
|
|
|
- name: verify with_subelements results
|
|
|
@ -129,7 +129,7 @@
|
|
|
|
- name: test with_subelements in subkeys
|
|
|
|
- name: test with_subelements in subkeys
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
with_subelements:
|
|
|
|
with_subelements:
|
|
|
|
- element_data
|
|
|
|
- "{{element_data}}"
|
|
|
|
- the.sub.key.list
|
|
|
|
- the.sub.key.list
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify with_subelements in subkeys results
|
|
|
|
- name: verify with_subelements in subkeys results
|
|
|
@ -143,7 +143,7 @@
|
|
|
|
- name: test with_subelements with missing key or subkey
|
|
|
|
- name: test with_subelements with missing key or subkey
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
set_fact: "{{ '_'+ item.0.id + item.1 }}={{ item.1 }}"
|
|
|
|
with_subelements:
|
|
|
|
with_subelements:
|
|
|
|
- element_data_missing
|
|
|
|
- "{{element_data_missing}}"
|
|
|
|
- the.sub.key.list
|
|
|
|
- the.sub.key.list
|
|
|
|
- skip_missing: yes
|
|
|
|
- skip_missing: yes
|
|
|
|
register: _subelements_missing_subkeys
|
|
|
|
register: _subelements_missing_subkeys
|
|
|
@ -227,7 +227,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- name: create indexed list
|
|
|
|
- name: create indexed list
|
|
|
|
set_fact: "{{ item[1] + item[0]|string }}=set"
|
|
|
|
set_fact: "{{ item[1] + item[0]|string }}=set"
|
|
|
|
with_indexed_items: list_data.stdout_lines
|
|
|
|
with_indexed_items: "{{list_data.stdout_lines}}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify with_indexed_items result
|
|
|
|
- name: verify with_indexed_items result
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|