Re: [ansible-project] How should I debug the git module hanging when specifying a hash for the version?

688 views
Skip to first unread message

James Tanner

unread,
Dec 19, 2013, 11:06:07 AM12/19/13
to ansible...@googlegroups.com
On 12/11/2013 09:25 AM, Cristian Necula wrote:
> Hello,
>
> I am pretty new to ansible. I have used it for a week and succesfully
> created some playbooks for orchestrating my server.
>
> I have run into an issue using the git module. I have a playbook that
> clones a private repo. It works great for the master and dev branches,
> but it hangs when i specify version=release/1.2 or version=<SHA-ID>.
> I have tried debugging this using ansible-playbook -vvvv with no success.
>
> Can anyone offer some tips?
> --
> 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-proje...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Tell ansible to keep the remote script and then use use python -m trace
to walk through it ...

ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook -vvvv

# grab the remote filename ansible creates

# ssh to the remote host

python -m trace --trace <module-file-path>

Example:

$ python -m trace --trace
/home/jtanner/.ansible/tmp/ansible-1387469069.32-4132751518012/command
2>&1 | head
--- modulename: command, funcname: <module>
command(21): import sys
command(22): import datetime
command(23): import traceback
command(24): import re
command(25): import shlex
--- modulename: shlex, funcname: <module>
shlex.py(2): """A lexical analyzer class for simple shell-like syntaxes."""
shlex.py(10): import os.path
shlex.py(11): import sys

Michael DeHaan

unread,
Dec 19, 2013, 11:16:35 AM12/19/13
to ansible...@googlegroups.com
The git module often requires adding the host to known_hosts or forwarding SSH creds.

We have an open ticket to add some additional options for auto-handling these kinds of things, which I hope to see resolved in 1.5.




On Thu, Dec 19, 2013 at 11:06 AM, James Tanner <tann...@gmail.com> wrote:
On 12/11/2013 09:25 AM, Cristian Necula wrote:
Hello,

I am pretty new to ansible. I have used it for a week and succesfully created some playbooks for orchestrating my server.

I have run into an issue using the git module. I have a playbook that clones a private repo. It works great for the master and dev branches, but it hangs when i specify version=release/1.2 or version=<SHA-ID>.
I have tried debugging this using ansible-playbook -vvvv with no success.

Can anyone offer some tips?
--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Tell ansible to keep the remote script and then use use python -m trace to walk through it ...

ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook -vvvv

# grab the remote filename ansible creates

# ssh to the remote host

python -m trace --trace <module-file-path>

Example:

$ python -m trace --trace /home/jtanner/.ansible/tmp/ansible-1387469069.32-4132751518012/command 2>&1 | head
 --- modulename: command, funcname: <module>
command(21): import sys
command(22): import datetime
command(23): import traceback
command(24): import re
command(25): import shlex
 --- modulename: shlex, funcname: <module>
shlex.py(2): """A lexical analyzer class for simple shell-like syntaxes."""
shlex.py(10): import os.path
shlex.py(11): import sys
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Reply all
Reply to author
Forward
0 new messages