mosquitto.conf.jinja 753 B

123456789101112131415161718192021
  1. {% macro mqtt_config(values) -%}
  2. # Changes in this file will be lost at the next restart
  3. # Use {{ values.consts.extra_config_path }} directory for additional configuration
  4. listener {{ values.network.broker_port.port_number }}
  5. {%- if values.network.enable_ws %}
  6. listener {{ values.network.ws_port.port_number }}
  7. protocol websockets
  8. {%- endif %}
  9. log_dest stdout
  10. allow_anonymous {{ "true" if values.mosquitto.allow_anonymous else "false" }}
  11. persistence {{ "true" if values.mosquitto.enable_persistence else "false" }}
  12. {%- if values.mosquitto.enable_persistence %}
  13. persistence_location {{ values.consts.data_path }}
  14. autosave_interval {{ values.mosquitto.autosave_interval }}
  15. {%- endif %}
  16. include_dir {{ values.consts.extra_config_path }}
  17. {% endmacro %}