ansible-infra/ansible_collections/debops/debops/roles/sudo/templates/etc/sudo-ldap.conf.j2
Stefan Bethke 2aed20393f
Some checks failed
/ Ansible Lint (push) Failing after 5m45s
/ Ansible Lint (pull_request) Failing after 4m59s
Vendor Galaxy Roles and Collections
2026-02-06 22:07:16 +01:00

20 lines
969 B
Django/Jinja

{# Copyright (C) 2018 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2018 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-only
#}
# {{ ansible_managed }}
# See sudoers.ldap(5) for details.
# This file shouldn't be world readable.
{% for option in sudo__ldap_combined_configuration | debops.debops.parse_kv_config %}
{% if option.state | d('present') not in [ 'absent', 'ignore' ] %}
{% if ((option.separator | d()) | bool or option.comment | d()) and not loop.first %}
{% endif %}
{% if option.comment | d() %}
{{ option.comment | regex_replace('\n$','') | comment(prefix='', postfix='') -}}
{% endif %}
{{ '{}{}\t{}{}'.format(('#' if (option.state | d('present') == 'comment') else ''), option.name | upper, ('\t' if (option.name | count < 8) else ''), (option.value if option.value is string else (option.value | selectattr("name", "defined") | map(attribute="name") | list | join(' ')))) }}
{% endif %}
{% endfor %}