Hello Everyone,
I have a playbook
- name: Test
uri:
url: https://192.168.1.1
method: POST
body:
"IPADDRESS={{ item.address }}"
body_format: "form-urlencoded"
when: item.device_type.model == "2921" or
item.device_type.model == "3931"
But this way list is going very big.
Now I want to create some sort of dictionary and put the name of that to
use with when like below:
vars:
- ciscorouters:
- 2921
- 3931
when: item.device_type.model == {{ ciscorouters }}
Please let me know the procedure.
Thanks in advance.
--
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/ff66b4cc-0963-4ca3-a251-6c0e5a2c12c3n%40googlegroups.com.