Enter response once prompt returns?

Posted by mjb on Super User See other posts from Super User or by mjb
Published on 2014-08-19T20:10:49Z Indexed on 2014/08/19 22:23 UTC
Read the original article Hit count: 157

Filed under:
|
|
|

It's neither a secure idea nor one I'd recommend elsewhere, but I have a situation when occasionally it takes a while for my Ansible ad-hoc command to respond. I'd love to pipe or args or whatever is needed to push the required text into the prompt so I can walk away and know it will finish.

Ex:

$ ansible all -m shell -a "reboot" --ask-pass
Password:
blah blah blah it worked

I'd love to send an argument or << or something to get the password in. Is that possible?

© Super User or respective owner

Related posts about linux

Related posts about ubuntu