mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
17 lines
515 B
YAML
17 lines
515 B
YAML
---
|
|
- name: "🔓 Let the lab's administrator escalate without a prompt"
|
|
hosts: all
|
|
become: true
|
|
gather_facts: false
|
|
vars_files:
|
|
- ../roles/user-administrator/vars/main.yml
|
|
tasks:
|
|
- name: "🔓 Drop the lab sudoers override"
|
|
ansible.builtin.copy:
|
|
content: "{{ USER_ADMINISTRATOR_NAME }} ALL=(ALL) NOPASSWD: ALL\n"
|
|
dest: "/etc/sudoers.d/zz-swarm-lab-{{ USER_ADMINISTRATOR_NAME }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0440"
|
|
validate: "visudo -cf %s"
|