linuxinstaller/ansible/configure-local-admin.yml

22 lines
544 B
YAML
Raw Normal View History

2024-09-30 19:32:52 +02:00
#
# 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"