Hi everyone,

I have a problem where a task has a condition to run only when the service 
is "running". However when I gather the facts, it gathers the wrong status.
How do I fix it?
I already restart the service but it is not fixed.

ACTUAL SERVICE
● consul.service - LSB: Manage the consul server
   Loaded: loaded (/etc/rc.d/init.d/consul; bad; vendor preset: disabled)
   Active: active (*running*) since Thu 2019-01-10 18:32:23 GMT; 6min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17953 ExecStart=/etc/rc.d/init.d/consul start (code=exited, 
status=0/SUCCESS)
   Memory: 46.4M
   CGroup: /system.slice/consul.service
           └─17963 /usr/local/bin/consul agent 
-config-dir=/etc/consul.d/server/


WHEN I GATHER FACTS
TASK [steady state] 
******************************************************************************************************************
ok: [sj3-tl-consul05] => {
    "ansible_facts.services.consul": {
        "name": "consul",
        "source": "sysv",
        "state": "*stopped*"
    }
}

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b7d3a545-5eb2-433d-a5bf-38a6c9b9d9c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to