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

24 lines
771 B
YAML

---
- name: Set variables
ansible.builtin.set_fact:
manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
- name: Enable passwordless sudo access to wheel group (Others)
ansible.builtin.lineinfile:
path: /etc/sudoers
line: "%wheel ALL=(ALL) NOPASSWD: ALL"
regexp: "^#? *%wheel ALL=\\(ALL\\) NOPASSWD: ALL$"
become: true
when: not manjaro
- name: Enable passwordless sudo access to wheel group (Manjaro)
ansible.builtin.copy:
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
dest: /etc/sudoers.d/11-wheel-nopasswd
mode: u=rwx,g=rx,o=
when: manjaro
become: true
# /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.