r/base: Set SSH authorized keys for root

To ensure all machines have the same keys to allow root to log in via
SSH (in case Active Directory is unavailable or something).
jenkins-master
Dustin 2021-10-16 15:39:19 -05:00
parent 815240983f
commit d6fff04985
1 changed files with 9 additions and 0 deletions

View File

@ -21,3 +21,12 @@
tags: tags:
- root-user - root-user
- user - user
- name: ensure ssh keys are authorized for root login
ansible.posix.authorized_key:
user: root
exclusive: true
key: '{{ root_authorized_keys }}'
when: root_authorized_keys is defined
tags:
- root-user
- ssh-key