1
0
Fork 0
mirror of synced 2024-11-22 00:35:36 -05:00

sudoers_prepare test

This commit is contained in:
Kenneth Wilke 2013-08-20 12:10:47 -05:00
parent 0fbaed2a6a
commit abd8e8c67a
4 changed files with 13 additions and 20 deletions

View file

@ -2,18 +2,9 @@ sudoers:
users:
# Simple user
johndoe:
- commands:
- ALL
# Defaults
janedoe:
- hosts: ALL
- runas: ALL
- commands:
- ALL
groups:
sudo:
- commands:
# Command tags
- ALL:
- NOPASSWD
- ALL: ALL
# List of users
janedoe,marydoe:
# Multiple hosts
- ALL: ALL
#include: /etc/sudoers.d

View file

@ -1,6 +1,4 @@
{% set sudoers = pillar.get('sudoers', {}) %}
{% set users = sudoers.get('users', {} %}
{% set groups = sudoers.get('users', {} %}
{% set includedir = sudoers.get('includedir', None) %}
#
@ -13,7 +11,9 @@
# Cmnd alias specification
# User privilege specification
{%- for userspec in users %}
{{ userspec }}
{%- endfor %}
# Group privilege specification

View file

@ -0,0 +1,2 @@
def run(**kwargs):
print kwargs

View file

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