only manage authorized_keys for root if keys are set via inventory

This commit is contained in:
nd 2019-07-02 22:15:39 +02:00
parent 67c261083c
commit 68ae0c0098
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -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\""