This commit is contained in:
mperochon 2017-06-02 17:09:55 +02:00
parent a96d3a2ebb
commit 7ce9d2f24c

View file

@ -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: