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

23 lines
720 B
YAML

- 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: Enable passwordless sudo access to wheel group (Manjaro)
copy:
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
dest: /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.