Ansible role to configure sudo settings on Linux Servers.
The role does not require anyting to run on RHEL and its derivatives.
Available variables are listed below, along with default values (see defaults/main.yml
):
sudo_group: "mygroup"
sudo_commands: "ALL=SHUTDOWN_CMDS, SERVICE"
sudo_group
(Required) The group (local or external) to grant access via sudo
sudo_commands
(Required) The command alises (configured in aliases.j2) to assign for the group
Role variables can be stored with the hosts.yaml file, or in the main variables file.
None.
- hosts: servers
roles:
- role: mikepruett3.sudo
The group tag has been configured to allow for playbook reused when creating multiple group files for sudoers access.
- hosts: servers
roles:
- role: mikepruett3.sudo
vars:
sudo_group: "mygroup"
sudo_commands: "ALL=SHUTDOWN_CMDS, SERVICE"
- role: mikepruett3.sudo
tags:
- group
vars:
sudo_group: "my2ndgroup"
sudo_commands: "ALL=SHUTDOWN_CMDS, SERVICE"
MIT
Role created by mikepruett3 on Github.com