#######################################################################################################
This repository and the role associated are deprecated in favor of the Manala Ansible Collection
You will find informations on its usage on the collection repository
#######################################################################################################
❗ Report issues and send Pull Requests in the main Ansible Role repository ❗
This role will deal with the setup of Sudo.
It's part of the Manala Ansible stack but can be used as a stand alone component.
None.
None.
Using ansible galaxy cli:
ansible-galaxy install manala.sudo
Using ansible galaxy requirements file:
- src: manala.sudo
Name | Type | Description |
---|---|---|
sudo restart |
Service | Restart sudo service |
Name | Default | Type | Description |
---|---|---|---|
manala_sudo_install_packages |
~ | Boolean | Dependency packages to install |
manala_sudo_install_packages_default |
['sudo'] | Boolean | Default dependency packages to install |
manala_sudo_sudoers_exclusive |
false | Boolean | Sudoers files exclusivity |
manala_sudo_sudoers_dir |
'/etc/sudoers.d' | String | Sudoers files directory path |
manala_sudo_sudoers_defaults |
{} | Array | Sudoers files defaults |
manala_sudo_sudoers |
[] | Array | Sudoers files directives |
- hosts: all
vars:
manala_sudo_sudoers:
# Template based (file name based on template)
- template: sudo/app.j2
# Template based (force file name)
- file: template
template: sudo/app.j2
# Content based
- file: content
config: |
user ALL=NOPASSWD:ALL
# Config based (deprecated)
- file: config
config:
- vagrant: ALL=NOPASSWD:ALL
# Ensure sudoer is absent
- file: absent
state: absent # "present" by default
# Ignore sudoer
- file: ignore
state: ignore
# Flatten sudoers
- "{{ my_custom_sudoers_array }}"
roles:
- role: manala.sudo
Exclusivity (all sudoers non defined by role will be deleted)
manala_sudo_sudoers_exclusive: true
MIT
Manala (http://www.manala.io/)