starting some stuff out here
This commit is contained in:
parent
d9f1a84b78
commit
0fbaed2a6a
4 changed files with 54 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
sudoers
|
||||
=======
|
||||
|
||||
Set up the sudoers file
|
||||
Set up the sudoers file (WORK IN PROGRESS)
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
19
pillar.example
Normal file
19
pillar.example
Normal 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
24
sudoers/files/sudoers
Normal 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
10
sudoers/init.sls
Normal 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
|
Loading…
Reference in a new issue