If you just want to execute task by task and press OK for continuing you could use the step mode by adding --step to the ansible-playbook command.
This way ansible-playbook will ask before every task to execute it (=y) skip it (=n) or continue without stepping (=c). Perform task: configure ssh (y/n/c): https://docs.ansible.com/ansible/2.4/playbooks_startnstep.html#step $ ansible-playbook playbook.yml --step However, - as Brian already pointed out - providing additional information during execution of the playbook is not supported. [email protected] schrieb am Donnerstag, 5. August 2021 um 00:43:23 UTC+3: > For example, > > show interface status > show version > show ip route > > how can a module be written in Ansible to prompt user for the show command > to type in when running a playbook. If entered one command (show interface > status) and matched, print the output and ignore the rest other commands. > If no match found, print default msg : "command not found" or something > like that. > > I am noob to Ansible. > > Thanks for your help! > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3ba3e70f-cfe2-4e77-a061-e8a0e38e2715n%40googlegroups.com.
