Add role for deploying SSH authorized_keys and add it to maint. playb.
Having this role will enable us to easily manage SSH authorized_keys.
This commit is contained in:
@@ -3,3 +3,8 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
roles:
|
roles:
|
||||||
- system_update
|
- system_update
|
||||||
|
|
||||||
|
- name: Ensure correct authorized_keys are deployed
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- authorized_keys
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPH2H5bko/cRy5MGaHaKxQ1KT/f4m3RMS5Cy+qqSFdqh
|
||||||
6
playbooks/roles/authorized_keys/tasks/main.yaml
Normal file
6
playbooks/roles/authorized_keys/tasks/main.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- name: Deploy authorized keys for cit user
|
||||||
|
ansible.posix.authorized_key:
|
||||||
|
state: present
|
||||||
|
user: cit
|
||||||
|
exclusive: true
|
||||||
|
key: "{{ lookup('file', 'cit_authorized_keys') }}"
|
||||||
Reference in New Issue
Block a user