Yes, this can be achievable. You can use when condition.
On Thu, Oct 22, 2020 at 11:59 AM Sobhan Anavarapu < [email protected]> wrote: > I have a question, with optional input of A or B in vars_prompt can the > command be executed in a playbook task. > > example > - name: checking the switchshow > value_command: > command_set: > - command: switchdisable > - command: switchshow > > Like with vars_prompt if we select A 1st command need to execute if B > second command need to execute > > Can this be achieved with Ansible ? > > -- > 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/b134e188-0ad0-488e-b8a3-fe66a42350a6n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b134e188-0ad0-488e-b8a3-fe66a42350a6n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAK8vF9Jzid7pMjs7riPdqryvTUAuobsfbQ8V7pqMeFLoVfFoKA%40mail.gmail.com.
