Discussion:
[ansible-project] sg": "ERROR! ssh connection closed waiting for password prompt", Error
Gaurav Suryagandh
2015-07-13 06:43:31 UTC
Permalink
Hello All,

I am trying to use script module of ansible to execute my local script on
the remote machine but i am facing below error.

sg": "ERROR! ssh connection closed waiting for password prompt",

Below is debug trace.


TASK [script]
*******************************************************************
<10.116.123.159> EXEC mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180 && echo
$HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180
<10.116.123.159> PUT
/home/gaurav/deployment-automation/scripts/mailserverstage1.sh TO
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh
<10.116.123.159> EXEC chmod +rx
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh
<10.116.123.159> EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh
-q -t 201 -s 2
<10.116.123.159> EXEC rm -rf
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/
/dev/null 2>&1
fatal: [10.116.123.159]: FAILED! => {"msg": "ERROR! ssh connection closed
waiting for password prompt", "failed": true}

PLAY RECAP
**********************************************************************
10.116.123.159 : ok=5 changed=3 unreachable=0 failed=1

Appreciate any help.

Thanks,
Gaurav
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ec3ff303-87bb-4f81-9ca1-42287d5322ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Uwe Sauter
2015-07-13 13:23:26 UTC
Permalink
Can you access your host via SSH keys? You cannot use Ansible in a productive environment when you are asked for the password at
each run…
Post by Gaurav Suryagandh
Hello All,
I am trying to use script module of ansible to execute my local script on the remote machine but i am facing below error.
sg": "ERROR! ssh connection closed waiting for password prompt",
Below is debug trace.
TASK [script] *******************************************************************
<10.116.123.159> EXEC mkdir -p $HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180 && echo $HOME/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180
<10.116.123.159> PUT /home/gaurav/deployment-automation/scripts/mailserverstage1.sh TO
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh
<10.116.123.159> EXEC chmod +rx /home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh
<10.116.123.159> EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
/home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/mailserverstage1.sh -q -t 201 -s 2
<10.116.123.159> EXEC rm -rf /home/openstack/.ansible/tmp/ansible-tmp-1436787876.28-251104705726180/ >/dev/null 2>&1
fatal: [10.116.123.159]: FAILED! => {"msg": "ERROR! ssh connection closed waiting for password prompt", "failed": true}
PLAY RECAP **********************************************************************
10.116.123.159 : ok=5 changed=3 unreachable=0 failed=1
Appreciate any help.
Thanks,
Gaurav
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ec3ff303-87bb-4f81-9ca1-42287d5322ba%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/ec3ff303-87bb-4f81-9ca1-42287d5322ba%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/55A3BBCE.6090107%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-13 14:55:24 UTC
Permalink
yes you can, just pass -k to ansible and it will take care of passwords.
Post by Uwe Sauter
Can you access your host via SSH keys? You cannot use Ansible in a productive environment when you are asked for the password at
each run…
--
Brian Coca
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8kHBom7A9U2ac_1s6X%2BbVNJQGph8TCTVV2zAm1JFUF9gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...