ansible-role-cerebro/templates/cerebro.conf.j2

40 lines
864 B
Django/Jinja

# {{ ansible_managed }}
{% for option, value in cerebro_full_config.items() %}
{{ option }} = {{ value }}
{% endfor %}
{% if cerebro_auth_type in ['basic', 'ldap'] %}
auth = {
type = {{ cerebro_auth_type }}
{% if cerebro_auth_type == 'basic' %}
username = {{ cerebro_auth_username }}
password = {{ cerebro_auth_password }}
{% endif %}
settings {
{% for option, value in cerebro_auth_settings.items() %}
{{ option }} = {{ value }}
{% endfor %}
}
}
{% endif %}
hosts = [
{% for host in cerebro_hosts %}
{
name = {{ host.name }}
host = {{ host.url }}
{% if 'auth' in host %}
auth = {
username = {{ host.auth.username }}
password = {{ host.auth.password }}
}
{% endif %}
{% if 'options' in host %}
{% for option, value in host.options.items() %}
{{ option }} = {{ value }}
{% endfor %}
{% endif %}
}
{% endfor %}
]