Convert loop labels to strings
Since ansible-core 2.15 it's a requirement to have loop labels as strings. In order to remain code readable, we move definition of label to vars and convert them to json string for output. Change-Id: I453d2db4eeefb78735db54cf9e6fa8fa5f89b069
This commit is contained in:
parent
95aaaf1337
commit
1139b8a18f
@ -56,7 +56,9 @@
|
||||
loop: "{{ _cert_slurp.results }}"
|
||||
loop_control:
|
||||
loop_var: install
|
||||
label:
|
||||
label: "{{ loop_label | to_json }}"
|
||||
vars:
|
||||
loop_label:
|
||||
path: "{{ install.item.dest | dirname }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
@ -71,7 +73,9 @@
|
||||
loop: "{{ _cert_slurp.results }}"
|
||||
loop_control:
|
||||
loop_var: install
|
||||
label:
|
||||
label: "{{ loop_label | to_json }}"
|
||||
vars:
|
||||
loop_label:
|
||||
dest: "{{ install.item.dest }}"
|
||||
owner: "{{ install.item.owner | default(omit) }}"
|
||||
group: "{{ install.item.group | default('omit') }}"
|
||||
|
@ -29,7 +29,9 @@
|
||||
register: ca_copy
|
||||
loop: "{{ _ca_slurp.results | default([]) }}"
|
||||
loop_control:
|
||||
label:
|
||||
label: "{{ loop_label | to_json }}"
|
||||
vars:
|
||||
loop_label:
|
||||
dest: "{{ pki_trust_store_location[ansible_facts['pkg_mgr']] }}/{{ item.item.filename | default(item.item.name ~ '.crt') }}"
|
||||
when: item.skipped is not defined
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
Loading…
Reference in New Issue
Block a user