Manage SSH keys with Ansible

This commit is contained in:
polyfloyd 2024-03-20 20:31:54 +01:00
parent eff6091c5a
commit 6fc9d8df96
19 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,8 @@
---
- name: Update authorized_keys
tags: authorized_keys
template:
src: authorized_keys.j2
dest: /root/.ssh/authorized_keys
mode: 0600
when: root_access is defined and root_access

View file

@ -0,0 +1,5 @@
# Managed by Ansible
{% for name in root_access %}
{{ lookup('file', 'authorized_keys/'+name+'.keys') }}
{% endfor %}