21 lines
544 B
YAML
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"
|
|
|