I’m testing the monit module, and I think the states are wrong, or maybe I’m making a mistake
Whether I run summary, I get:
monit summary
The Monit daemon 5.1.1 uptime: 6m
Process ‘nfsen’ running
Process ‘mongod’ running
Process ‘memcached’ running
Process ‘openvassd’ running
And in order to test the monit module I’ve created the below playbook:
- hosts: myhostname
user: myuser
tasks: - name: Ensure NFSEN is running
action: monit name=nfsen state=started
When I run ansible, I get an error:
ansible-playbook myplaybook.yml
PLAY [XXXXX] **********************************************************
GATHERING FACTS ***************************************************************
ok: [XXXXX]
TASK: [Ensure NFSEN is running] ************************************
failed: [XXXXX] => {“failed”: true}
msg: Process ‘nfsen’ running
FATAL: all hosts have already failed – aborting
PLAY RECAP ********************************************************************
XXXXX : ok=1 changed=0 unreachable=0 failed=1
What I’m doing wrong?
Thanks in advance
Cristobal