paulbsd-salt/states/sudo/sudoers.j2
2021-08-19 21:15:24 +02:00

17 lines
536 B
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "sudo/map.jinja" import sudo with context %}
{%- if sudo.config.defaults is defined -%}
{%- for default in sudo.config.defaults %}
Defaults {{ default }}
{%- endfor %}
{%- endif %}
{%- if sudo.config.acls is defined -%}
{%- for key, acl in sudo.config.acls.items() %}
{% if acl.group %}%{% endif %}{{ key }} {{ acl.host|default('ALL') }}=({{ acl.who|default('ALL') }}) {{ acl.command|default('ALL') }}
{%- endfor %}
{%- endif %}
#includedir /etc/sudoers.d