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