Open jsalatiel opened 2 years ago
Can you provide the output from when it failed please?
Sure.
"msg": "Could not resolve id of vlan: {'name': 'some-manually-deleted-vlan-here'}"}
IMHO it should no try to resolve the vlan id if the state: absent
Sorry, I should have been more clear. If you can provide the stack trace, along with the error, that would help us hunt down where the check needs to happen. You can get this by running ansible-playbook and using the -vvv
argument.
Ansible NetBox Collection version
v3.8.0
Ansible version
NetBox version
3.2.5
Python version
3.8
Steps to Reproduce
Create a prefix using the following data:
Now manually delete the prefix and vlan on the webui and re-run the playbook using absent instead of present and the playbook will fail. The module should not try to parse the VLAN if the requested prefix state is absent.
Expected Behavior
The playbook should not fail
Observed Behavior
The playbook fails if the vlan does not exist even if the required state for the prefix is absent