paulbsd-salt/states/sudo/sudoers.j2
2021-09-25 16:09:00 +02:00

18 lines
537 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