2014-10-02 09:29:40 +02:00
|
|
|
{% from "sudoers/package-map.jinja" import pkgs with context %}
|
|
|
|
|
2014-02-09 18:32:22 +01:00
|
|
|
include:
|
|
|
|
- sudoers
|
|
|
|
|
|
|
|
{% set sudoers = pillar.get('sudoers', {}) %}
|
|
|
|
{% set included_files = sudoers.get('included_files', []) %}
|
|
|
|
{% for included_file,spec in included_files.items() -%}
|
|
|
|
{{ included_file }}:
|
|
|
|
file.managed:
|
|
|
|
- user: root
|
2014-10-14 08:15:30 +02:00
|
|
|
- group: {{ pkgs.get('group', 'root') }}
|
2014-02-09 18:32:22 +01:00
|
|
|
- mode: 440
|
|
|
|
- template: jinja
|
|
|
|
- source: salt://sudoers/files/sudoers
|
|
|
|
- context:
|
|
|
|
included: True
|
|
|
|
sudoers: {{ spec }}
|
|
|
|
- require:
|
2014-10-02 09:29:40 +02:00
|
|
|
- file: {{ pkgs.get('config-path', '/etc') }}/sudoers
|
2014-02-09 18:32:22 +01:00
|
|
|
{% endfor %}
|