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
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Ensure authorized_keys keys
|
- name: Add SSH authorized keys
|
||||||
copy:
|
ansible.posix.authorized_key:
|
||||||
dest: /root/.ssh/authorized_keys
|
user: root
|
||||||
content: "{{ vars.ssh_keys | join('\n') }}"
|
key: "{{ item }}"
|
||||||
owner: root
|
state: present
|
||||||
group: root
|
with_items: "{{ vars.ssh_keys }}"
|
||||||
mode: '0600'
|
|
||||||
|
|
Loading…
Reference in a new issue