https://github.com/mikepruett3/ansible-role-sudo
Ansible role to configure sudo settings on Linux Servers.
https://github.com/mikepruett3/ansible-role-sudo
ansible ansible-role security sudo sudoers sudoers-configuration
Last synced: 2 months ago
JSON representation
Ansible role to configure sudo settings on Linux Servers.
- Host: GitHub
- URL: https://github.com/mikepruett3/ansible-role-sudo
- Owner: mikepruett3
- License: mit
- Created: 2021-06-15T15:52:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T22:14:02.000Z (about 2 years ago)
- Last Synced: 2025-06-04T11:37:35.951Z (about 1 year ago)
- Topics: ansible, ansible-role, security, sudo, sudoers, sudoers-configuration
- Language: Jinja
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Role: Sudo
=========
Ansible role to configure sudo settings on Linux Servers.
Requirements
------------
The role does not require anyting to run on RHEL and its derivatives.
Role Variables
--------------
Available variables are listed below, along with default values (see ```defaults/main.yml```):
``` yaml
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.
Dependencies
------------
None.
Example Playbook
----------------
``` yaml
- hosts: servers
roles:
- role: mikepruett3.sudo
```
Tags
----
The **group** tag has been configured to allow for playbook reused when creating multiple group files for **sudoers** access.
``` yaml
- 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"
```
License
-------
MIT
Author Information
------------------
Role created by [mikepruett3](https://github.com/mikepruett3) on [Github.com](https://github.com/mikepruett3/ansible-role-sudo)