Merge pull request #13 from kev009/master

Initial FreeBSD support
This commit is contained in:
Forrest 2014-10-02 11:12:06 -07:00
commit 36744c92de
4 changed files with 18 additions and 14 deletions

View File

@ -1,10 +1,10 @@
sudoers: sudoers:
users: users:
johndoe: johndoe:
- 'ALL=(ALL) ALL' - 'ALL=(ALL) ALL'
- 'ALL=(root) NOPASSWD: /etc/init.d/httpd' - 'ALL=(root) NOPASSWD: /etc/init.d/httpd'
groups: groups:
sudo: sudo:
- 'ALL=(ALL) ALL' - 'ALL=(ALL) ALL'
- 'ALL=(nodejs) NOPASSWD: ALL' - 'ALL=(nodejs) NOPASSWD: ALL'
defaults: defaults:
@ -43,8 +43,8 @@ sudoers:
included_files: included_files:
/etc/sudoers.d/extra-file: /etc/sudoers.d/extra-file:
users: users:
foo: foo:
- 'ALL=(ALL) ALL' - 'ALL=(ALL) ALL'
groups: groups:
bargroup: bargroup:
- 'ALL=(ALL) NOPASSWD: ALL' - 'ALL=(ALL) NOPASSWD: ALL'

View File

@ -1,3 +1,5 @@
{% from "sudoers/package-map.jinja" import pkgs with context %}
include: include:
- sudoers - sudoers
@ -15,5 +17,5 @@ include:
included: True included: True
sudoers: {{ spec }} sudoers: {{ spec }}
- require: - require:
- file: /etc/sudoers - file: {{ pkgs.get('config-path', '/etc') }}/sudoers
{% endfor %} {% endfor %}

View File

@ -4,7 +4,7 @@ sudo:
pkg.installed: pkg.installed:
- name: {{ pkgs.sudo }} - name: {{ pkgs.sudo }}
/etc/sudoers: {{ pkgs.get('config-path', '/etc') }}/sudoers:
file.managed: file.managed:
- user: root - user: root
- group: root - group: root

View File

@ -1,12 +1,14 @@
{% set package_table = { {% set package_table = {
'Debian': {'sudo': 'sudo'}, 'Debian': {'sudo': 'sudo'},
'Ubuntu': {'sudo': 'sudo'}, 'Ubuntu': {'sudo': 'sudo'},
'CentOS': {'sudo': 'sudo'}, 'CentOS': {'sudo': 'sudo'},
'Fedora': {'sudo': 'sudo'}, 'Fedora': {'sudo': 'sudo'},
'RedHat': {'sudo': 'sudo'}, 'RedHat': {'sudo': 'sudo'},
'Amazon': {'sudo': 'sudo'}, 'Amazon': {'sudo': 'sudo'},
'Gentoo': {'sudo': 'app-admin/sudo'}, 'Gentoo': {'sudo': 'app-admin/sudo'},
'Mint': {'sudo': 'sudo'} 'Mint': {'sudo': 'sudo'},
'FreeBSD': {'sudo': 'sudo',
'config-path': '/usr/local/etc/'}
} %} } %}
{% if 'package_table' in pillar %} {% if 'package_table' in pillar %}