1
0
Fork 0
mirror of synced 2024-06-16 20:11:08 -04:00
formula-sudoers/sudoers/included.sls
Alejandro Bednarik ae1b5dab1b Update include.sls with correct execprefix reference
Sorry Imissed this update
2017-08-16 11:52:38 -03:00

23 lines
669 B
Plaintext

{% from "sudoers/map.jinja" import sudoers with context %}
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
- group: {{ sudoers.get('group', 'root') }}
- mode: 440
- template: jinja
- source: salt://sudoers/files/sudoers
- check_cmd: {{ sudoers.get('execprefix', '/usr/sbin') }}/visudo -c -f
- context:
included: True
sudoers: {{ spec|json }}
- require:
- file: {{ sudoers.get('configpath', '/etc') }}/sudoers
{% endfor %}