18 lines
421 B
YAML
18 lines
421 B
YAML
---
|
|
- name: Create .ssh directory for admin user
|
|
file:
|
|
path: /home/admin/.ssh
|
|
state: directory
|
|
owner: admin
|
|
group: admin
|
|
mode: '0700'
|
|
|
|
- name: Deploy authorized SSH keys for admin user
|
|
template:
|
|
src: authorized_keys.j2
|
|
dest: /home/admin/.ssh/authorized_keys
|
|
owner: admin
|
|
group: admin
|
|
mode: '0600'
|
|
when: admin_authorized_keys is defined and admin_authorized_keys | length > 0
|