linuxinstaller/ansible/configure-local-admin.yml
2024-09-30 19:32:52 +02:00

21 lines
544 B
YAML

#
# Configure un sudoer
#
- name: Préparation de l'installation
hosts: localhost
tasks:
- name: Configure sudo pour {{ user }}
ansible.builtin.copy:
content: |
# Autorise {{ user }} à faire sudo
{{ user }} ALL = ALL
dest: /etc/sudoers.d/libreticmenu_allow_sudo_{{ user }}
when: state == "present"
- name: Supprime sudo pour {{ user }}
ansible.builtin.file:
path: /etc/sudoers.d/libreticmenu_allow_sudo_{{ user }}
state: absent
when: state == "absent"