## {{ ansible_managed }} [Unit] Description=Mosquitto MQTT Broker daemon ConditionPathExists=/etc/mosquitto/mosquitto.conf After=network.target Requires=network.target [Service] User={{ mosquitto_user }} Group={{ mosquitto_user }} Type=forking RemainAfterExit=no StartLimitInterval=0 PIDFile={{ mosquitto_pid_file }} ExecStart=/bin/sh -c "/usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d" ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartSec=2 [Install] WantedBy=multi-user.target