ansible --version
ansible 2.1.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
While running the below playbook , i'm getting JSON object error at the
service stop level .
---
- hosts: all
become: yes
gather_facts: yes
tasks:
- name: start conn drain
command: /etc/init.d/egw drain
ignore_errors: True
- uri:
url: http://{{ ansible_hostname }}:7777/stats
return_content: yes
register: stats_page
until: ( "/io/tcp/listening::active = 1" in stats_page.content )
retries: 60
delay: 3
- name: Stop the EGW service
service: name=egw state=stopped
ignore_errors: True
===========
TASK [Stop the EGW service]
****************************************************
fatal: [g2axpilotegw1.sba.expertcity.com]: FAILED! => {"changed": false,
"failed": true, "module_stderr": "", "module_stdout": "\r\nTraceback (most
recent call last):\r\n File
\"/tmp/ansible_Hg86yp/ansible_module_service.py\", line 1518, in
<module>\r\n main()\r\n File
\"/tmp/ansible_Hg86yp/ansible_module_service.py\", line 1480, in
main\r\n (rc, out, err) = service.modify_service_state()\r\n File
\"/tmp/ansible_Hg86yp/ansible_module_service.py\", line 311, in
modify_service_state\r\n return self.service_control()\r\n File
\"/tmp/ansible_Hg86yp/ansible_module_service.py\", line 894, in
service_control\r\n rc_state, stdout, stderr = self.execute_command(\"%s
%s %s\" % (svc_cmd, self.action, arguments), daemonize=True)\r\n File
\"/tmp/ansible_Hg86yp/ansible_module_service.py\", line 256, in
execute_command\r\n return json.loads(data)\r\n File
\"/usr/lib64/python2.6/json/__init__.py\", line 307, in loads\r\n return
_default_decoder.decode(s)\r\n File
\"/usr/lib64/python2.6/json/decoder.py\", line 319, in decode\r\n obj,
end = self.raw_decode(s, idx=_w(s, 0).end())\r\n File
\"/usr/lib64/python2.6/json/decoder.py\", line 338, in raw_decode\r\n
raise ValueError(\"No JSON object could be decoded\")\r\nValueError: No
JSON object could be decoded\r\n", "msg": "MODULE FAILURE", "parsed": false}
Any pointer's on the same ?
Thank you
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/dbd04e6d-5980-4f36-b95e-21a62a77c968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.