ansible-base/roles/icinga2_server/templates/api-users.conf.j2

24 lines
514 B
Plaintext
Raw Permalink Normal View History

2020-10-02 22:35:00 +02:00
/**
* {{ ansible_managed }}
*/
{% for user in icinga2_server_api_users %}
object ApiUser "{{ user.username }}" {
password = "{{ user.password }}"
{% if user.permissions is string %}
permissions = [ "{{ user.permissions }}" ]
{% else %}
permissions = [
{% for permission in user.permissions %}
{
permission = "{{ permission.name }}"
{% if permission.filter is defined %}
filter = {{ '{{' }} {{ permission.filter }} {{ '}}' }}
{% endif %}
},
{% endfor %}
]
{% endif %}
}
{% endfor %}