2019-09-06 13:39:42 +00:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2020-02-12 20:38:41 +00:00
|
|
|
{% for option, value in cerebro_full_config.items() %}
|
2019-09-06 13:39:42 +00:00
|
|
|
{{ 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 {
|
2020-02-12 20:38:41 +00:00
|
|
|
{% for option, value in cerebro_auth_settings.items() %}
|
2019-09-06 13:39:42 +00:00
|
|
|
{{ 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 %}
|
2020-02-12 20:38:41 +00:00
|
|
|
{% for option, value in host.options.items() %}
|
2019-09-06 13:39:42 +00:00
|
|
|
{{ option }} = {{ value }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
}
|
|
|
|
{% endfor %}
|
|
|
|
]
|