I know there’s an ask_pass option when calling ansible on the command line (-k), but I’m using the API in a larger Python script and I need the same functionality. Is there an option I’ve missed that allows prompting for the SSH password from within the API? Perhaps a ansible.runner.Runner option that’s not documented on the site? Perhaps something in the inventory? I’ve looked through the ansible site for answers, but it seems the API is one of less documented areas.
If you are using the API you can supply the password as a parameter.
An API should itself avoid going interactive which is why that happens in the bin scripts.
–Michael
Thanks for the idea. I’ll have a look at the ansible script to see how that’s handled there.