homeserver/friedhof/mgrote_rsync/tasks/user.yml
Michael Grote 563223e182
All checks were successful
ansible-lint / gitleaks (push) Successful in 57s
ansible-lint / Ansible Lint (push) Successful in 1m19s
replace rsync with freefilesync (#286)
the replacement gets replaced :-D

- old: 7a2ccbabb6

see also:

- ddaa6835b5
- 56e85dfa93

Reviewed-on: #286
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2025-01-18 19:08:01 +01:00

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