Skip to content

Ansible role to configure sudo settings on Linux Servers.

License

Notifications You must be signed in to change notification settings

mikepruett3/ansible-role-sudo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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):

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

    - 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.

    - 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 on Github.com

About

Ansible role to configure sudo settings on Linux Servers.

Topics

Resources

License

Stars

Watchers

Forks

Languages