Which led me to wondering about how to debug something like this. I had hoped that -D would give me something to work with but I got nada. Short of diving into the Python code and adding print statements, do you have suggestions?
Returning to the command that I wanted to run, I think that it is waiting for a password to be entered. It I put some backslashed in front of the dollar sign, I get different output. I haven’t found a quantity of backslashed that work. How many do you think I should have?
Which led me to wondering about how to debug something like this. I had hoped that -D would give me something to work with but I got nada. Short of diving into the Python code and adding print statements, do you have suggestions?
-D provides module debug output only.
Returning to the command that I wanted to run, I think that it is waiting for a password to be entered. It I put some backslashed in front of the dollar sign, I get different output. I haven’t found a quantity of backslashed that work. How many do you think I should have?
Ansible shouldn’t ask for a password unless you use --ask-pass. Note that ansible is trying root unless you pass in “-u” to ansible.
This should of course immediately die, not hang.
Sudo may hang if you were using --sudo, at least in 0.3 implementations.
to run properly in the shell module? I enclosed the whole thing in single quotes and tried 0, 1, 2, 4, 6 and 8 backslashes in front of the dollar sign. None worked.
Seth: I’ll try backticks and see if it works better.
Michael: No, I want the command executed remotely, not locally.
BTW, I do understand that I am moving afield from “configuration management” into “system management” and that this is not what ansible is intended to do. I was just playing with using ansible in lieu of pssh and hit this curiosity.