Browse Source

Manjaro, aargh

master
Geoffrey Frogeye 1 year ago
parent
commit
729de4013e
Signed by: geoffrey GPG Key ID: C72403E7F82E6AD8
  1. 20
      config/automatrop/roles/access/tasks/main.yml

20
config/automatrop/roles/access/tasks/main.yml

@ -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.
Loading…
Cancel
Save