Reputation: 83
While using Linux when we try to install something using the command line we get a prompt
"Do you want to continue"[Y/N]..
I want to automate it using an ansible-playbook.
Upvotes: 2
Views: 727
Reputation: 1540
For this kind of use case, the module expect could be use.
For example in your case a basic task looks like this :
- name : "Provide custom input"
expect:
command: 'launch.sh'
responses:
'Do you want to continue\"\[Y\/N\]\"': 'y'
Upvotes: 2