Skip to content

joshbeard/ansible-role-sudo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role for Sudo

Deliberately simple Ansible role for managing sudo.

Installation

Example requirements.yml file for ansible-galaxy:

roles:
  - src: https://github.com/joshbeard/ansible-role-sudo.git
    scm: git
    version: '0.1.0'
    name: jbeard.sudo

Usage

Variables

Variable Description
sudoers_dir Absolute path to the sudoers.d directory.
sudoers_files A Dict of sudoers files to create. The key is the filename and a content key (string) is the contents of the file.
lookup_default_vars Toggles looking up the OS-specific defaults from the 'vars/' directory. This requires facts to be available. It can be disabled if sudoers_dir is explicitly set.

Refer to defaults/main.yml and vars/.

Example Configuration

# Absolute path to sudoers.d directory
sudoers_dir: /usr/local/etc/sudoers.d

# Dictionary of sudoers files to create.
sudoers_files:
  # This will create /usr/local/etc/sudoers.d/wheel
  wheel:
    content: |
      %wheel ALL=(ALL) NOPASSWD: ALL
      # This is a test

About

Simple Ansible role for sudo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages