blob: e6fa4b52344d1cbc426f7dbeb8a486a69993496c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# {{ ansible_managed }}
## Global
{% if mosquitto_global_config_options is defined %}
{% for option, value in mosquitto_global_config_options.items() %}
{{ option }} {{ value }}
{% endfor %}
{% endif %}
{% for name, listener in mosquitto_listeners.items() %}
## Listener: {{ name }}
listener {{ listener.bind }}
{% if 'tls' in listener %}
certfile /etc/mosquitto/certs/{{ name }}-crt.pem
keyfile /etc/mosquitto/certs/{{ name }}-key.pem
dhparamfile /etc/mosquitto/certs/dhparams.pem
{% endif %}
{% if 'options' in listener %}
{% for option, value in listener.options.items() %}
{{ option }} {{ value }}
{% endfor %}
{% endif %}
{% endfor %}
{% if mosquitto_prometheus_listener %}
## Prometheus monitoring
listener 0 /var/run/mosquitto/prometheus.sock
allow_anonymous true
{% endif %}
|