0
0
mirror of https://github.com/saltstack-formulas/sudoers-formula.git synced 2024-11-28 02:57:52 +01:00
sudoers-formula/sudoers/included.sls

23 lines
670 B
Plaintext
Raw Normal View History

2015-01-01 23:14:56 +01:00
{% from "sudoers/map.jinja" import sudoers with context %}
2014-10-02 09:29:40 +02:00
include:
- sudoers
{% do sudoers.update(pillar.get('sudoers', {})) %}
{% set included_files = sudoers.get('included_files', {}) %}
{% for included_file,spec in included_files.items() -%}
{{ included_file }}:
file.managed:
- user: root
2015-01-01 23:14:56 +01:00
- group: {{ sudoers.get('group', 'root') }}
- mode: 440
- template: jinja
- source: salt://sudoers/files/sudoers
- check_cmd: {{ sudoers.get('exec-prefix', '/usr/sbin') }}/visudo -c -f
- context:
included: True
2015-01-09 16:14:09 +01:00
sudoers: {{ spec|json }}
- require:
- file: {{ sudoers.get('configpath', '/etc') }}/sudoers
{% endfor %}