mosquitto: Refactor mqtt infra
This commit is contained in:
parent
a8841252d1
commit
7ee2572e04
6 changed files with 99 additions and 31 deletions
|
@ -1,7 +1,3 @@
|
|||
# use different settings for plaintext and tls listeners
|
||||
per_listener_settings true
|
||||
|
||||
# listen to mqtt
|
||||
listener 1883
|
||||
protocol mqtt
|
||||
|
||||
|
@ -9,15 +5,12 @@ acl_file /etc/mosquitto/acl.conf
|
|||
password_file /etc/mosquitto/passwd
|
||||
allow_anonymous false
|
||||
|
||||
# listen to mqtt over websockets
|
||||
listener 8883
|
||||
protocol mqtt
|
||||
connection tls-bridge
|
||||
address {{ inventory_hostname }}:8883
|
||||
bridge_cafile {{ tls_certs }}/ca.crt
|
||||
bridge_certfile {{ tls_certs }}/{{ inventory_hostname }}.crt
|
||||
bridge_keyfile {{ tls_private }}/{{ inventory_hostname }}.key
|
||||
|
||||
certfile {{ tls_certs }}/{{ inventory_hostname }}.crt
|
||||
keyfile {{ tls_private }}/{{ inventory_hostname }}.key
|
||||
cafile {{ tls_certs }}/ca.crt
|
||||
tls_version tlsv1.3
|
||||
|
||||
acl_file /etc/mosquitto/acl-tls.conf
|
||||
require_certificate true
|
||||
use_identity_as_username true
|
||||
{% for shelly in shellies %}
|
||||
topic # out 0 shellies/{{ shelly['name'] }}/ home/{{ shelly['room'] }}/{{ shelly['device'] }}/
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue