New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell command hangs only when using ansible. #12459
Comments
Hi @anandkumarpatel, you should not be using sudo in the command, but instead should be enabling sudo via the keyword. Please see the documentation here: http://docs.ansible.com/ansible/become.html If you continue having problems with this, I'd recommend asking your question on the mailing list:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
anandkumarparel Did you find a solution to this? I am having exact same problem when running a shell script that is chatting /dev/urandom This is the only ansible related Google result and searching the Google group like suggested above does turn up anything |
I've had the same issue as the OP. In my case, I was generating passwords with:
Running that over ssh or normal shell was not an issue, however ansible would be stuck on the cat process. Using:
gives almost the same(if not the same) result and ansible had no issues moving on with life. I don't know what caused ansible to be stuck, but I've solved my issue with the work-around line above. |
When using the old version, executing this script over ansible results in the 'cat' call spinning with one CPU on 100%. Following the suggestion from ansible/ansible#12459, this change helps, and produces the same result. Don't ask.
When using the old version, executing this script over ansible results in the 'cat' call spinning with one CPU on 100%. Following the suggestion from ansible/ansible#12459, this change helps, and produces the same result. Don't ask.
My guess is that In which case it's not hung, it's just slow. If you wait long enough (possibly days) it will continue. This looks at first glance like "useless use of cat", but in this case that's actually wrong: it's harmful use of cat, because This is actually a bad idea even if you're not using Ansible, as it depletes the secure entropy pool; Replace this with If you don't want |
* Fixed hang on Vultr Ubuntu 16.04 when used as a startup script. Google gets credit for this fix directing me to ansible/ansible#12459 * code formatting change
I am having issues while trying to run a script inside ansible. when this script is run ansible just hang running the command.
script run
Running from terminal gives me this
however running from ansible results in this:
and hangs at that line
here is my task:
system info
ansible debug log
Not sure what is going on, Let me know if there is a way I can collect more information.
The text was updated successfully, but these errors were encountered: