configure authorized keys
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user