Scope all_known_hosts in mult-node-known-hosts
Ansible is moving towards ansible_facts return values going in to ansible_facts rather than the top-level dict. ansible_facts exists starting in ansible 2.5, so go ahead and start consuming the value that way. Change-Id: Iac13b1efb47c9d79ed088e1cf9176003790c74f7
This commit is contained in:
parent
e3d911b3ef
commit
054812719f
@ -6,7 +6,7 @@
|
|||||||
known_hosts:
|
known_hosts:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
key: "{{ item.key }}"
|
key: "{{ item.key }}"
|
||||||
with_items: "{{ all_known_hosts }}"
|
with_items: "{{ ansible_facts.all_known_hosts }}"
|
||||||
|
|
||||||
- name: add default known_host record for every user
|
- name: add default known_host record for every user
|
||||||
become: true
|
become: true
|
||||||
@ -14,4 +14,4 @@
|
|||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
key: "{{ item.key }}"
|
key: "{{ item.key }}"
|
||||||
path: /etc/ssh/ssh_known_hosts
|
path: /etc/ssh/ssh_known_hosts
|
||||||
with_items: "{{ all_known_hosts }}"
|
with_items: "{{ ansible_facts.all_known_hosts }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user