2015-01-01 17:14:56 -05:00
|
|
|
{% from "sudoers/map.jinja" import sudoers with context %}
|
2014-10-02 03:29:40 -04:00
|
|
|
|
2014-02-09 12:32:22 -05:00
|
|
|
include:
|
|
|
|
- sudoers
|
|
|
|
|
|
|
|
{% set sudoers = pillar.get('sudoers', {}) %}
|
2014-12-24 09:08:03 -05:00
|
|
|
{% set included_files = sudoers.get('included_files', {}) %}
|
2014-02-09 12:32:22 -05:00
|
|
|
{% for included_file,spec in included_files.items() -%}
|
|
|
|
{{ included_file }}:
|
|
|
|
file.managed:
|
|
|
|
- user: root
|
2015-01-01 17:14:56 -05:00
|
|
|
- group: {{ sudoers.get('group', 'root') }}
|
2014-02-09 12:32:22 -05:00
|
|
|
- mode: 440
|
|
|
|
- template: jinja
|
|
|
|
- source: salt://sudoers/files/sudoers
|
|
|
|
- context:
|
|
|
|
included: True
|
|
|
|
sudoers: {{ spec }}
|
|
|
|
- require:
|
2015-01-01 17:14:56 -05:00
|
|
|
- file: {{ sudoers.get('config-path', '/etc') }}/sudoers
|
2014-02-09 12:32:22 -05:00
|
|
|
{% endfor %}
|