In my playbook, I have:
- name: Set OWF to start at boot
service: name=owf enabled=yes
The result:
TASK: [Set OWF to start at boot] *********************
…
failed: [demo] => {“failed”: true}
msg: Usage: {start|stop|restart}
Adding ‘-x’ to the shebang of /etc/init.d/owf shows that ansible is executing that file:
failed: [demo] => {“failed”: true}
msg: + OWF_BIN_WHAT=Ozone Web Framework 5.0
- OWF_BIN=/opt/OWF/apache-tomcat-7.0.21
- test -x /opt/OWF/apache-tomcat-7.0.21
- echo Usage: {start|stop|restart}
- exit 1
We’re supposed to be ENABLING that service, not executing it!
System is Ubuntu 12.04 I suppose I could use ‘command’ or ‘shell’ to do this, but I like to find out what went wrong and why