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:
Jens Harbott 2017-10-19 17:21:36 +00:00
parent 27422f6606
commit a1fda7fb7a
1 changed files with 2 additions and 1 deletions

View File

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