fix become handling

This commit is contained in:
Robert Kaussow 2018-11-05 00:19:24 +01:00
parent a9f4036a5b
commit eacfcfb454
2 changed files with 2 additions and 19 deletions

View File

@ -6,3 +6,5 @@
name: mosquitto
enabled: yes
listen: __mosquitto_restart
become: True
become_user: root

View File

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