Elasticsearch restart task hangs up in Ansible Playbook

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?

While Starting Elasticsearch It show log on shell in earlier version it was
just show [OK]. Does this cause any problem in ansible playbook?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6674a460-7cf5-4b97-b2b2-70671493420b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fix this problem. Cause of the issue. I am using old version of service
wrapper script for elasticsearch. After update * /etc/init.d/elasticsearch*
everything is working fine.

On Wednesday, 10 September 2014 15:52:50 UTC+5:30, Roopendra Vishwakarma
wrote:

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?

While Starting Elasticsearch It show log on shell in earlier version it
was just show [OK]. Does this cause any problem in ansible playbook?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/75daf5e9-2407-415e-a152-169a02017987%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.