Hello all,

The problem still persists but I have more information:


   - Ansible version: ansible 1.9.1
   - Everything works if I am NOT using "su"
   - I can run manually on the server the last ansible command displayed in 
   my log.
   - The password prompt is "Password:"
   - Gather facts works fine
   - Python 2.6.6
   - Linux machine

Is it something related to the "Password:" prompt? How to find this out?


Regards,

Olivier


On Monday, 27 July 2015 17:32:04 UTC+1, Olivier Lauret wrote:
>
> Hi all, I was wondering if there was away to debug a very simple playbook 
> when it is hanging.
>
>
> ### Playbook:
> - name: Install app on my servers
>   hosts: my_hosts
>   gather_facts: no
>   remote_user: my_user
>   su: yes
>
>   roles:
>   - app_install
>
>
> #### app_install role (under tasks/main.yml)
> - name: query whoami
>   shell: whoami
>
>
> It always hangs at the this level:
>
> *[PROJECT] myotheruser@myprodserver# ansible-playbook -i hosts -k 
> --ask-su-pass my_playbook.yml -vvvv*
> *SSH password:*
> *SU password[defaults to SSH password]:*
>
> *PLAY [Install app on my servers] *************************************
>
> *TASK: [app_install | query whoami] ****
> *<my_server.mydomain.com <http://my_server.mydomain.com>> ESTABLISH 
> CONNECTION FOR USER: my_user on PORT 22 TO my_server.mydomain.com 
> <http://my_server.mydomain.com>*
> *<my_server.mydomain.com <http://my_server.mydomain.com>> REMOTE_MODULE 
> command whoami #USE_SHELL*
> *<my_server.mydomain.com <http://my_server.mydomain.com>> EXEC /bin/sh -c 
> 'mkdir -p 
> /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733 && 
> chmod a+rx 
> /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733 && echo 
> /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733'*
> *<my_server.mydomain.com <http://my_server.mydomain.com>> PUT 
> /tmp/tmp6UGeFE TO 
> /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733/command*
> *<my_server.mydomain.com <http://my_server.mydomain.com>> EXEC /bin/sh -c 
> 'su root -c "/bin/sh -c '"'"'echo 
> BECOME-SUCCESS-xzmbgooensxgrlbezhnlngbagojwbczg; LANG=en_US.UTF-8 
> LC_CTYPE=en_US.UTF-8 /usr/bin/python 
> /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733/command; 
> rm -rf /tmp/.ansible_my_user/tmp/ansible-tmp-1438014075.95-221459817104733/ 
> >/dev/null 2>&1'"'"'"'*
>
>
> And nothing else!
>
> Ping works on this server.
>
> Any idea?
>
> Regards,
> Olivier
>

-- 
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/21a0df69-a645-4f90-9c0c-a58701f37ee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to