1
0
Fork 0
mirror of synced 2024-11-22 08:45:35 -05:00
formula-sudoers/sudoers/included.sls

22 lines
584 B
Text
Raw Normal View History

2014-10-02 03:29:40 -04:00
{% from "sudoers/package-map.jinja" import pkgs with context %}
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
- group: {{ pkgs.get('group', 'root') }}
- mode: 440
- template: jinja
- source: salt://sudoers/files/sudoers
- context:
included: True
sudoers: {{ spec }}
- require:
2014-10-02 03:29:40 -04:00
- file: {{ pkgs.get('config-path', '/etc') }}/sudoers
{% endfor %}