You've already forked ssh-protect
chore: fix ssh keys write
This commit is contained in:
@@ -5,11 +5,10 @@
|
|||||||
attr: '-i'
|
attr: '-i'
|
||||||
|
|
||||||
- name: Write ssh keys
|
- name: Write ssh keys
|
||||||
copy:
|
template:
|
||||||
content: "item"
|
src: "authorized_keys.j2"
|
||||||
dest: "/root/.ssh/authorized_keys"
|
dest: "/root/.ssh/authorized_keys"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
with_items: "{{ ssh_protect_root_public_keys }}"
|
|
||||||
|
|
||||||
- name: Setup i attr in authorized_keys file
|
- name: Setup i attr in authorized_keys file
|
||||||
file:
|
file:
|
||||||
|
|||||||
3
templates/authorized_keys.j2
Normal file
3
templates/authorized_keys.j2
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{% for key in ssh_protect_root_public_keys %}
|
||||||
|
{{key}}
|
||||||
|
{% endfor %}
|
||||||
Reference in New Issue
Block a user