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

19 views
Skip to first unread message

Brian Coca

unread,
Aug 26, 2021, 10:20:13 AM8/26/21
to Ansible Project
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: ansible_net_version in ios_image1




--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages