Add known_hosts support
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
26544ee4b3
commit
429935d063
@ -21,3 +21,6 @@ ssh_key_private_filename: id_rsa
|
||||
|
||||
ssh_key_public_content:
|
||||
ssh_key_public_filename: id_rsa.pub
|
||||
|
||||
ssh_known_hosts_content:
|
||||
ssh_known_hosts_filename: known_hosts
|
||||
|
@ -20,6 +20,15 @@
|
||||
owner: "{{ ssh_user_name }}"
|
||||
state: directory
|
||||
|
||||
- name: Create ssh known_hosts file.
|
||||
copy:
|
||||
content: "{{ ssh_known_hosts_content }}"
|
||||
dest: "{{ ssh_user_home }}/.ssh/{{ ssh_known_hosts_filename }}"
|
||||
group: "{{ ssh_user_group }}"
|
||||
mode: 0644
|
||||
owner: "{{ ssh_user_name }}"
|
||||
when: ssh_known_hosts_content
|
||||
|
||||
- name: Create ssh private key.
|
||||
copy:
|
||||
content: "{{ ssh_key_private_content }}"
|
||||
|
Loading…
Reference in New Issue
Block a user