Michael Grote
7a2ccbabb6
no more zfs send mirroring with rsync snaps an both sides Reviewed-on: #221 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
26 lines
592 B
YAML
26 lines
592 B
YAML
---
|
|
- name: Ensure group exists
|
|
become: true
|
|
ansible.builtin.group:
|
|
name: "{{ rsync_mirror_user_group }}"
|
|
state: present
|
|
|
|
- name: Ensure user exists
|
|
become: true
|
|
ansible.builtin.user:
|
|
name: "{{ rsync_mirror_user }}"
|
|
groups:
|
|
- "{{ rsync_mirror_user_group }}"
|
|
- root
|
|
- users
|
|
create_home: true # für .ssh
|
|
append: true
|
|
|
|
- name: Ensure user is added to sudoers
|
|
become: true
|
|
community.general.sudoers:
|
|
name: "users-sudo-{{ rsync_mirror_user }}"
|
|
state: present
|
|
user: "{{ rsync_mirror_user }}"
|
|
commands: ALL
|
|
nopassword: true
|