ssh keys: append instead of overwrite
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
parent
cc76a73dfd
commit
aa0bea9b70
1 changed files with 6 additions and 7 deletions
|
@ -6,10 +6,9 @@
|
|||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Ensure authorized_keys keys
|
||||
copy:
|
||||
dest: /root/.ssh/authorized_keys
|
||||
content: "{{ vars.ssh_keys | join('\n') }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
- name: Add SSH authorized keys
|
||||
ansible.posix.authorized_key:
|
||||
user: root
|
||||
key: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ vars.ssh_keys }}"
|
||||
|
|
Loading…
Reference in a new issue