Skip to content

Ansible role to setup sudoers configuration from a template with a rollback feature

Notifications You must be signed in to change notification settings

quidame/ansible-role-sudoers_apply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sudoers_apply

Configure sudoers from a template. A rollback feature ensures you will not be locked out of root privileges on the target host.

Requirements

None.

Role Variables

This role can be set using the following variables:

  • The filename of the sudoers configuration fragment to install in /etc/sudoers.d.
sudoers_apply__filename: sudoers_apply
  • Path of a template file that once evaluated is used as a sudoers configuration fragment.
sudoers_apply__template: sudoers_apply.j2
  • The delay, in seconds, after what the initial sudo configuration is reloaded if the confirmation file is missing.
sudoers_apply__timeout: 20

Dependencies

None.

Example Playbook

Apply new set of Defaults options from a specific template.

- hosts: servers
  roles:
    - role: sudoers_apply
      sudoers_apply__filename: 00_defaults
      sudoers_apply__template: sudoers.d/00_defaults.j2

License

GPLv3

Author Information

quidame@poivron.org

About

Ansible role to setup sudoers configuration from a template with a rollback feature

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published