Use copy instead of file for add-sshkey task
Also set a safe mode just in case. Change-Id: Ica6ca8f5e39f64f8d944d1b7b9fd9a7229e8b988
This commit is contained in:
parent
27422f6606
commit
a1fda7fb7a
@ -1,7 +1,8 @@
|
||||
- name: Write out ssh key
|
||||
file:
|
||||
copy:
|
||||
path: "~/.ssh/id_rsa"
|
||||
content: "{{ ssh_key.ssh_private_key }}"
|
||||
mode: 0400
|
||||
|
||||
- name: Add host key information to known hosts
|
||||
known_hosts:
|
||||
|
Loading…
x
Reference in New Issue
Block a user