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

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