only manage authorized_keys for root if keys are set via inventory
This commit is contained in:
parent
67c261083c
commit
68ae0c0098
1 changed files with 1 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
owner: root
|
||||
group: "{{root_group}}"
|
||||
mode: 0600
|
||||
when: admin_ssh_keys | length
|
||||
|
||||
- name: create ssh host keys
|
||||
shell: "prefix=\"{{ rootpath }}\"; ssh-keygen -N \"\" -t ed25519 -f \"${prefix}/etc/ssh/ssh_host_ed25519_key\"; ssh-keygen -N \"\" -b 4096 -t rsa -f \"${prefix}/etc/ssh/ssh_host_rsa_key\"; ssh-keygen -N \"\" -b 521 -t ecdsa -f \"${prefix}/etc/ssh/ssh_host_ecdsa_key\""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue