Hi cloud you help me how to write ansible playbooks for tags, which were used in rds database in aws cloud.
Thanks & regards, On Fri, Mar 19, 2021 at 4:24 PM Vikram S <[email protected]> wrote: > I have wrriten below script to check if switch is in state mentioned in > WHEN condition and to end playbook if so. But when condition doesn't work > when i use 'OR' conditional to check for multiple conditions. > > I tried different ways of writing the OR syntax as given below but didn't > work. What am i doing wrong? > > SYNTAX 1: > > name: GATHER STACK INFO > ios_command: > commands: "show switch" > > register: print_showswitch > > - name: END THIS PLAYBOOK IF ALL MEMBER SWITCHES ARE NOT IN READY STATE > meta: end_host > when: - "'Waiting' in print_showswitch.stdout[0]" or > - "'Progressing' in print_showswitch.stdout[0]" or > - "'Initializing' in print_showswitch.stdout[0]" > > > SYNTAX 2: > > when: > - ("'Waiting' in print_showswitch.stdout[0]") or ("'Progressing' in > print_showswitch.stdout[0]") > > > SYNTAX 3: > > when: > - ("'Waiting' in print_showswitch.stdout[0]" or "'Progressing' in > print_showswitch.stdout[0]") > > Thanks, > Vikram > > -- > 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/395a7793-3e36-4a59-80fe-4ee2c5886bf2n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/395a7793-3e36-4a59-80fe-4ee2c5886bf2n%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/CAH%2BpV%2BSZyoBO9Vd4Rb4T9i99h04%2BaGhMPir-YKnaBpJq%3DDU%3DRw%40mail.gmail.com.
