Merge "Use loop labels to suppress output"

This commit is contained in:
Zuul 2023-01-13 17:41:47 +00:00 committed by Gerrit Code Review
commit 56cd6b3670
2 changed files with 12 additions and 1 deletions

View File

@ -56,6 +56,10 @@
loop: "{{ _cert_slurp.results }}" loop: "{{ _cert_slurp.results }}"
loop_control: loop_control:
loop_var: install loop_var: install
label:
path: "{{ install.item.dest | dirname }}"
state: directory
mode: '0755'
- name: Install Server certificates to targets - name: Install Server certificates to targets
copy: copy:
@ -67,7 +71,11 @@
loop: "{{ _cert_slurp.results }}" loop: "{{ _cert_slurp.results }}"
loop_control: loop_control:
loop_var: install loop_var: install
no_log: true label:
dest: "{{ install.item.dest }}"
owner: "{{ install.item.owner | default(omit) }}"
group: "{{ install.item.group | default('omit') }}"
mode: "{{ install.item.mode | default('0644') }}"
ignore_errors: "{{ ansible_check_mode }}" ignore_errors: "{{ ansible_check_mode }}"
notify: notify:
- cert installed - cert installed

View File

@ -28,6 +28,9 @@
dest: "{{ pki_trust_store_location[ansible_facts['pkg_mgr']] }}/{{ item.item.filename | default(item.item.name ~ '.crt') }}" dest: "{{ pki_trust_store_location[ansible_facts['pkg_mgr']] }}/{{ item.item.filename | default(item.item.name ~ '.crt') }}"
register: ca_copy register: ca_copy
loop: "{{ _ca_slurp.results | default([]) }}" loop: "{{ _ca_slurp.results | default([]) }}"
loop_control:
label:
dest: "{{ pki_trust_store_location[ansible_facts['pkg_mgr']] }}/{{ item.item.filename | default(item.item.name ~ '.crt') }}"
when: item.skipped is not defined when: item.skipped is not defined
ignore_errors: "{{ ansible_check_mode }}" ignore_errors: "{{ ansible_check_mode }}"