Replies: 5 comments
-
Have you set the untagged vlan to an empty string as well? |
Beta Was this translation helpful? Give feedback.
-
I have recreated the error you are having. In the API exploration you need to send a JSON
This may be something that we would need to do a URI module patch as a work around for the first step until a fix can be put in place. |
Beta Was this translation helpful? Give feedback.
-
I have now tried both, each time I get an error. ##Attempt 1: - name: "Set interface mode and vlan (empty)"
networktocode.nautobot.device_interface:
url: "{{ nautobot_api }}"
token: "{{ nautobot_token }}"
state: present
device: "{{ nautbot_device[0].value.name }}"
name: "{{ item }}"
mode: ""
untagged_vlan: ""
when: interface_data.mode == "NotConfigured"
delegate_to: localhost
##Attempt 2: - name: "Set interface mode and vlan (empty)"
networktocode.nautobot.device_interface:
url: "{{ nautobot_api }}"
token: "{{ nautobot_token }}"
state: present
device: "{{ nautbot_device[0].value.name }}"
name: "{{ item }}"
mode: ""
untagged_vlan: null
when: interface_data.mode == "NotConfigured"
delegate_to: localhost
|
Beta Was this translation helpful? Give feedback.
-
Task 10 here uses the API and ability to send just JSON with null at the interface. After the untagged VLAN is removed, then we can address changing the mode. You can also just use TASK 10 and add |
Beta Was this translation helpful? Give feedback.
-
This is definitely a bug that we need to get addressed in the modules. But for now that is a workaround. |
Beta Was this translation helpful? Give feedback.
-
Hello,
how can I reset the interface VLAN mode to empty?
An empty string does not work.
Beta Was this translation helpful? Give feedback.
All reactions