configure authorized keys

This commit is contained in:
2026-07-25 12:15:55 -05:00
parent 9518826ea4
commit 94fc56674f
5 changed files with 42 additions and 5 deletions
+34
View File
@@ -208,7 +208,41 @@
become: true
ansible.builtin.apt:
clean: yes
changed_when: false
## New
- name: root needs heath's authorized_key
become: true
ansible.posix.authorized_key:
user: root
state: present
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
## New
- name: hpf-ans needs hpf-ans's authorized_key
become: true
ansible.posix.authorized_key:
user: hpf-ans
state: present
key: "{{ lookup('file', 'files/ssh-keys/hpf-ans.pub') }}"
## New
- name: first needs multiple authorized keys
ansible.posix.authorized_key:
user: first
state: present
key: "{{ lookup('file', item) }}"
loop:
- files/ssh-keys/heath.pub
- files/ssh-keys/hpf-ans.pub
## New
- name: heath needs heath's authorized_key
become: true
ansible.posix.authorized_key:
user: heath
state: present
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
# - name: Create ansible-pull.sh crontab entry
# become: true