Skip to content

Commit a5df886

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix conditional on ansible_vault_in_place_copy"
2 parents 2ecc705 + 2714b4f commit a5df886

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

encrypt_secrets/roles/ansible_vault/tasks/ansible_vault_strings.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
when:
7777
- _secrets is defined
7878
- _secrets | length > 0
79-
- ansible_vault_in_place_copy
79+
- ansible_vault_in_place_copy | bool
8080

8181
- name: Place encrypted secrets in independent blocks
8282
ansible.builtin.blockinfile:
@@ -85,10 +85,12 @@
8585
marker: "# {mark} ANSIBLE MANAGED {{ item.item['key'] }}"
8686
mode: "0600"
8787
loop: "{{ new_secrets.results }}"
88+
loop_control:
89+
label: "{{ item.item['key'] }}"
8890
when:
8991
- _secrets is defined
9092
- _secrets | length > 0
91-
- not ansible_vault_in_place_copy
93+
- not ansible_vault_in_place_copy | bool
9294

9395
- name: Undefine the secrets variable
9496
ansible.builtin.set_fact:

0 commit comments

Comments
 (0)