Reputation: 4576
I have an sql script which asks for user input in the command line.
How can I somehow catch this prompt with some criteria and input some text while running ansible script?
upd:
I need to catch requests for manual input and instead of manually input values, input them programmatically.
Upvotes: 0
Views: 523
Reputation: 68239
Please look at expect module.
# Case insensitve password string match
- expect:
command: passwd username
responses:
(?i)password: "MySekretPa$$word"
Upvotes: 1