2024-10-28 18:17:23 +01:00
|
|
|
---
|
2024-10-28 18:32:18 +01:00
|
|
|
- name: Ensure group exists
|
2024-10-28 18:17:23 +01:00
|
|
|
become: true
|
|
|
|
ansible.builtin.group:
|
2024-10-28 18:27:43 +01:00
|
|
|
name: "{{ rsync_mirror_user_group }}"
|
2024-10-28 18:17:23 +01:00
|
|
|
state: present
|
|
|
|
|
2024-10-28 18:32:18 +01:00
|
|
|
- name: Ensure user exists
|
2024-10-28 18:17:23 +01:00
|
|
|
become: true
|
|
|
|
ansible.builtin.user:
|
2024-10-28 18:27:43 +01:00
|
|
|
name: "{{ rsync_mirror_user }}"
|
|
|
|
group: "{{ rsync_mirror_user_group }}"
|
2024-10-28 19:10:09 +01:00
|
|
|
create_home: true # für .ssh
|
2024-10-28 18:24:29 +01:00
|
|
|
|
|
|
|
- name: Ensure user is added to sudoers
|
|
|
|
become: true
|
|
|
|
community.general.sudoers:
|
2024-10-28 18:27:43 +01:00
|
|
|
name: "users-sudo-{{ rsync_mirror_user }}"
|
2024-10-28 18:24:29 +01:00
|
|
|
state: present
|
2024-10-28 18:27:43 +01:00
|
|
|
user: "{{ rsync_mirror_user }}"
|
2024-10-28 18:32:18 +01:00
|
|
|
commands: ALL # TODO einschränken?
|
2024-10-28 18:24:29 +01:00
|
|
|
nopassword: true
|