From 7ce9d2f24cac04370563af752bc70f64461fb2c1 Mon Sep 17 00:00:00 2001 From: mperochon Date: Fri, 2 Jun 2017 17:09:55 +0200 Subject: [PATCH] fix --- roles/vault/tasks/shared/sync_file.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/roles/vault/tasks/shared/sync_file.yml b/roles/vault/tasks/shared/sync_file.yml index 4ea63be90..ebc46939d 100644 --- a/roles/vault/tasks/shared/sync_file.yml +++ b/roles/vault/tasks/shared/sync_file.yml @@ -30,30 +30,15 @@ register: sync_file_key_stat when: sync_file_is_cert|d() -- name: "DEBUG VAULT : hostvar" - debug: - msg: "{{ hostvars }}" - -- name: debug - debug: - var: sync_file_hosts | unique - -- name: moar debug - set_fact: - sync_file_srcs: "{{ sync_file_srcs|default([]) + [host_item] }}" - debug: - msg: "{{ hostvars[host_item]['sync_file_stat'] }}" - with_items: "{{ sync_file_hosts | unique }}" - loop_control: - loop_var: host_item - - name: "sync_file | Combine all possible file sync sources" set_fact: sync_file_srcs: "{{ sync_file_srcs|default([]) + [host_item] }}" with_items: "{{ sync_file_hosts | unique }}" loop_control: loop_var: host_item - when: hostvars[host_item]["sync_file_stat"]["stat"]["exists"]|bool + when: + - hostvars[host_item]["sync_file_stat"]["stat"]["exists"]|bool + - host_item in play_hosts - name: "sync_file | Combine all possible key file sync sources" set_fact: