Hi,
The last couple of days i created a nice playbook for our switches to be configured out of the box. Everything is done via Ansible and works fine. The only thing i cant get to work is add ports a vlan via a loop.
I want to have a list like: untagged_ports: [1/1, 1/2, 1/3].
Than Ansible needs to do something like:
port_id: "{{ item.data_vlan_ports}}"
port_mode: "{{ item.mode}}"
with_items:
- {mode: POM_UNTAGGED, data_vlan_ports: "{{untagged_ports}}"}
The following code gives me the error:
HTTP Error 400: Bad Request", "requestid": "", "server": "eHTTP v2.0", "status": 400, "transfer-encoding": "chunked".
what do i wrong?
Can someone please point me in the right direction. I found many tutorials about lists and in a debug it works. Only in combination with aruba vlan it doesnt work.
In the end i want to achieve something like this:
vlan_1_ports:
- tagged:
[1, 2, 3, 7]
- untagged:
[10, 11, 12]
vlan_2_ports:
- tagged:
[1,2]
- untagged:
[23, 24]
Thanks in advance.