diff --git a/tasks/main_certs.yml b/tasks/main_certs.yml index 9b61fb1..cf64cc2 100644 --- a/tasks/main_certs.yml +++ b/tasks/main_certs.yml @@ -33,16 +33,16 @@ - name: Create certificate destination directories file: - path: "{{ install.item.dest | dirname }}" + path: "{{ install }}" state: directory mode: "0755" - loop: "{{ _cert_slurp.results }}" + loop: "{{ _cert_slurp.results | map(attribute='item') | map(attribute='dest') | map('dirname') | unique }}" loop_control: loop_var: install label: "{{ loop_label | to_json }}" vars: loop_label: - path: "{{ install.item.dest | dirname }}" + path: "{{ install }}" state: directory mode: '0755'