I am using ansible playbook to install elasticsearch and elasticsearch plugin. after successfully installation of Elasticsearch I written one ansible task to Restart Elasticsearch. Its restarting elasticsearch but ansible playbook hang up in this task. My ansible task is:
`
- name: “Ensure Elasticsearch is Running”
service: name=elasticsearch state=restarted
`
I also tried with shell: sudo service elasticsearch restart
but no luck.
Elasticsearch Version : 1.3.0
Ansible Version : 1.5.5
Verbose Output for the task is :
`
<app101.host.com> ESTABLISH CONNECTION FOR USER: prod on PORT 22 TO app101.host.com
<app101.host.com> REMOTE_MODULE service name=elasticsearch state=restarted
<app101.host.com> EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310
&& chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310 && echo $HOME/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310’
<app101.host.com> PUT /tmp/tmpjIMUkF TO /home/prod/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310/service
<app101.host.com> EXEC /bin/sh -c ‘sudo -k && sudo -H -S -p “[sudo via ansible, key=yeztwzmmsgyvjjqmmunnvtbopcplrbso]
password: " -u root /bin/sh -c '”’“‘echo SUDO-SUCCESS-yeztwzmmsgyvjjqmmunnvtbopcplrbso; /usr/bin/python /home/prod/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310/service;
rm -rf /home/prod/.ansible/tmp/ansible-tmp-1410327554.04-167734794521310/ >/dev/null 2>&1’”‘"’’
`
Any Suggestion?