roles/users/tasks/main.yml aktualisiert
This commit is contained in:
parent
205e189b89
commit
349ce92ced
1 changed files with 9 additions and 1 deletions
|
|
@ -6,13 +6,21 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Grant sudo without PW to admins group
|
- name: Grant sudo without PW to admins group
|
||||||
ansible.builtin.file:
|
ansible.builtin.template:
|
||||||
src: roles/users/files/sudo_group_admins
|
src: roles/users/files/sudo_group_admins
|
||||||
path: /etc/sudoers.d/admins
|
path: /etc/sudoers.d/admins
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0440'
|
mode: '0440'
|
||||||
|
|
||||||
|
- name: Enable sudoers.d subdir
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/sudoers
|
||||||
|
state: present
|
||||||
|
regexp: '^#includedir /etc/sudoers.d'
|
||||||
|
line: 'includedir /etc/sudoers.d'
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
|
|
||||||
- name: Ensure user "rulrich" exists
|
- name: Ensure user "rulrich" exists
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: rulrich
|
name: rulrich
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue