Installs authorized_keys files for users.
No global variables are used in this role.
- authkeys_public_keys
- authkeys_enabled
Users are encouraged to modify the role variables inside their group_vars folder.
This role does the following:
- Creates the directory /<user>/.ssh
- Creates the appropriate authorized key in /<user>/.ssh/authorized_keys
- /<user>/.ssh/authorized_keys
No programs are installed
Authorized Keys playbook
- name: Authorized Keys Ansible Playbook
hosts: all
user: root
connection: smart
vars:
authkeys_public_keys:
- username: 'root-authkey'
destination: 'root'
public_key: 'ssh-rsa root-key comment'
authkeys_enabled:
- 'root-authkey'
roles:
- authkeys