homeserver/roles/mgrote_rsync/tasks/user.yml
Michael Grote f52aa4384b
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 8s
ansible-lint / Ansible Lint (pull_request) Failing after 1m8s
dfg
2024-10-28 18:32:18 +01:00

22 lines
550 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 }}"
group: "{{ rsync_mirror_user_group }}"
create_home: false
- 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 # TODO einschränken?
nopassword: true