I have a custom upstart script that starts, stops, and restarts successfully via initctl but when Ansible attempts the same, it errors with the message "unrecognized service".
Here's my upstart script in its entirety, /etc/init/nginx-log-monitor.conf:
description "Nginx error log monitor"
start on runlevel [345]
stop on runlevel [6]
exec /usr/local/bin/logmonitor.sh /var/log/nginx/error.log '\[crit\|error' 'm...@domain.com'
And the error from Ansible:
NOTIFIED: [nginx_base | restart nginx log monitor] ****************************
msg: nginx-log-monitor: unrecognized service
nginx-log-monitor: unrecognized service
Is there something wrong with my upstart script?