2021-06-16 23:17:13 +02:00
|
|
|
- name: Set variables
|
|
|
|
set_fact:
|
|
|
|
manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
|
|
|
|
|
|
|
|
- name: Enable passwordless sudo access to wheel group (Others)
|
2021-06-13 14:46:01 +02:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/sudoers
|
|
|
|
line: "%wheel ALL=(ALL) NOPASSWD: ALL"
|
|
|
|
regexp: "^#? *%wheel ALL=\\(ALL\\) NOPASSWD: ALL$"
|
|
|
|
become: yes
|
2021-06-16 23:17:13 +02:00
|
|
|
when: not manjaro
|
2021-06-13 14:46:01 +02:00
|
|
|
|
2021-06-16 23:17:13 +02:00
|
|
|
- name: Enable passwordless sudo access to wheel group (Manjaro)
|
|
|
|
copy:
|
|
|
|
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
|
2021-06-17 21:21:34 +02:00
|
|
|
dest: /etc/sudoers.d/11-wheel-nopasswd
|
2021-06-16 23:17:13 +02:00
|
|
|
mode: "u=rwx,g=rx,o="
|
|
|
|
when: manjaro
|
2021-06-13 14:46:01 +02:00
|
|
|
become: yes
|
2021-06-16 23:17:13 +02:00
|
|
|
# /etc/sudoers.d/10-installer is the same thing,
|
|
|
|
# but **with** a password, and it's overwritten
|
|
|
|
# with each upgrade of manjaro-system, hence this.
|