Re: [ansible-project] tried to use pre-defined variable in WHEN conditional but not working, please assist

2021-08-26 Thread Brian Coca
2 problems: too many moustaches (all conditionals aka *when: have templating implied) when: ansible_net_version in ios_image1.stdout[0] from the expression above, ios_image1 does not have stdout, it is a string itself, you seem to be confusing it with a result dictionary when: an

[ansible-project] tried to use pre-defined variable in WHEN conditional but not working, please assist

2021-08-25 Thread Vikram S
Hi, Below is the output of a command i executed in cisco router. I wrote a TASK to extract only 'isr4300-universalk9.16.15.04.SPA.bin' using Regex from the output and put in a custom variable. Then i ran ios_facts module and one of the pre-defined variable in ios_facts is ansible_net_version.