Fix playbook error when files do not exist.

I was seeing "Failed to template loop_control.label: 'dict object' has no attribute 'path'"
This commit is contained in:
Shane McDonald 2022-03-08 08:18:05 -05:00
parent 7df66eff5e
commit b2fe1c46ee

View File

@ -27,7 +27,7 @@
when: not lookup('vars', item.item, default='') and not item.stat.exists
loop: "{{ secrets.results }}"
loop_control:
label: '{{ item.stat.path }}'
label: '{{ item.item }}'
- name: Include generated secrets unless they are explicitly passed in
include_vars: "{{ sources_dest }}/secrets/{{ item.item }}.yml"