Merge "Add known hosts for all users"
This commit is contained in:
commit
eeae72ef66
@ -2,8 +2,16 @@
|
|||||||
generate_all_known_hosts:
|
generate_all_known_hosts:
|
||||||
hostvars: "{{ hostvars }}"
|
hostvars: "{{ hostvars }}"
|
||||||
|
|
||||||
- name: add known_host record for every public key of every other ip, hostname
|
- name: add known_host record for every public key of every other ip, hostname for ansible_user
|
||||||
known_hosts:
|
known_hosts:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
key: "{{ item.key }}"
|
key: "{{ item.key }}"
|
||||||
with_items: "{{ all_known_hosts }}"
|
with_items: "{{ all_known_hosts }}"
|
||||||
|
|
||||||
|
- name: add default known_host record for every user
|
||||||
|
become: true
|
||||||
|
known_hosts:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
key: "{{ item.key }}"
|
||||||
|
path: /etc/ssh/ssh_known_hosts
|
||||||
|
with_items: "{{ all_known_hosts }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user