24 lines
565 B
YAML
24 lines
565 B
YAML
|
---
|
||
|
- name: template ssh public key
|
||
|
become: true
|
||
|
ansible.posix.authorized_key:
|
||
|
user: "{{ sanoid_user }}"
|
||
|
key: "{{ sanoid_syncoid_ssh_pubkey }}"
|
||
|
state: present
|
||
|
when:
|
||
|
- sanoid_syncoid_source_host
|
||
|
|
||
|
- name: add user to sudoers
|
||
|
become: true
|
||
|
ansible.builtin.blockinfile:
|
||
|
path: /etc/sudoers
|
||
|
state: present
|
||
|
block: |
|
||
|
{{ sanoid_user }} ALL=(ALL) NOPASSWD:ALL
|
||
|
validate: '/usr/sbin/visudo -cf %s'
|
||
|
backup: true
|
||
|
marker_begin: sanoid-sudoers BEGIN
|
||
|
marker_end: sanoid-sudoers END
|
||
|
when:
|
||
|
- sanoid_syncoid_source_host
|