mirror of
https://github.com/saltstack-formulas/sudoers-formula.git
synced 2024-11-28 05:07:57 +01:00
22 lines
585 B
Plaintext
22 lines
585 B
Plaintext
{% from "sudoers/map.jinja" import sudoers 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: {{ sudoers.get('group', 'root') }}
|
|
- mode: 440
|
|
- template: jinja
|
|
- source: salt://sudoers/files/sudoers
|
|
- context:
|
|
included: True
|
|
sudoers: {{ spec }}
|
|
- require:
|
|
- file: {{ sudoers.get('config-path', '/etc') }}/sudoers
|
|
{% endfor %}
|