Manjaro, aargh

This commit is contained in:
Geoffrey Frogeye 2021-06-16 23:17:13 +02:00
parent 45160c4f37
commit 729de4013e
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -1,12 +1,22 @@
- name: Enable passwordless sudo access to wheel group
- 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)
lineinfile:
path: /etc/sudoers
line: "%wheel ALL=(ALL) NOPASSWD: ALL"
regexp: "^#? *%wheel ALL=\\(ALL\\) NOPASSWD: ALL$"
become: yes
when: not manjaro
- name: Remove Manjaro installer sudoers override
file:
path: /etc/sudoers.d/10-installer
state: absent
- name: Enable passwordless sudo access to wheel group (Manjaro)
copy:
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
path: /etc/sudoers.d/11-wheel-nopasswd
mode: "u=rwx,g=rx,o="
when: manjaro
become: yes
# /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.