1
0
Fork 0

starting some stuff out here

This commit is contained in:
Kenneth Wilke 2013-08-19 17:06:34 -05:00
parent d9f1a84b78
commit 0fbaed2a6a
4 changed files with 54 additions and 1 deletions

View File

@ -1,7 +1,7 @@
sudoers
=======
Set up the sudoers file
Set up the sudoers file (WORK IN PROGRESS)
.. note::

19
pillar.example Normal file
View File

@ -0,0 +1,19 @@
sudoers:
users:
# Simple user
johndoe:
- commands:
- ALL
# Defaults
janedoe:
- hosts: ALL
- runas: ALL
- commands:
- ALL
groups:
sudo:
- commands:
# Command tags
- ALL:
- NOPASSWD
#include: /etc/sudoers.d

24
sudoers/files/sudoers Normal file
View File

@ -0,0 +1,24 @@
{% set sudoers = pillar.get('sudoers', {}) %}
{% set users = sudoers.get('users', {} %}
{% set groups = sudoers.get('users', {} %}
{% set includedir = sudoers.get('includedir', None) %}
#
# This file is managed by salt
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
# Group privilege specification
{% if includes %}
includedir {{ includedir }}
{% else %}
#includedir /etc/sudoers.d
{% endif %}

10
sudoers/init.sls Normal file
View File

@ -0,0 +1,10 @@
sudo:
pkg.installed
/etc/sudoers:
file.managed:
- user: root
- group: root
- mode: 440
- template: jinja
- source: salt://sudoders/files/sudoers