diff --git a/roles/vault/tasks/shared/sync_file.yml b/roles/vault/tasks/shared/sync_file.yml index 4a1b0d34b..a6da54144 100644 --- a/roles/vault/tasks/shared/sync_file.yml +++ b/roles/vault/tasks/shared/sync_file.yml @@ -54,7 +54,7 @@ set_fact: _: "{% if inventory_hostname in sync_file_srcs %}{{ sync_file_srcs.remove(inventory_hostname) }}{% endif %}" when: - - host_item in play_hosts + - inventory_hostname in play_hosts - sync_file_srcs|d([])|length > 1 - inventory_hostname != sync_file_srcs|first - sync_file_stat.stat.get("checksum") != hostvars[sync_file_srcs|first]["sync_file_stat"]["stat"]["checksum"] @@ -63,7 +63,7 @@ set_fact: _: "{% if inventory_hostname in sync_file_srcs %}{{ sync_file_srcs.remove(inventory_hostname) }}{% endif %}" when: - - host_item in play_hosts + - inventory_hostname in play_hosts - sync_file_is_cert|d() - sync_file_key_srcs|d([])|length > 1 - inventory_hostname != sync_file_key_srcs|first