I don't seem to be getting the expected workings. I can't seem to actually catch the prompt.
Here is what I have:
with settings(hide('commands', 'warnings') , warn_only=True):
prompts = expect('Are you sure you want to perform this operation? [Y/N]:', 'N')
with expecting(prompts):
run(sudo("/something.sh apply /some.file" , user="someuser"))
I'm pretty sure I'm doing something wrong.