You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We have an existing interface. That should be removed by Ansible with state: absent. When running the step fails with:
Traceback (most recent call last):
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1739371697.0629294-164-246873301641437/AnsiballZ_pfsense_interface.py", line 107, in <module>
_ansiballz_main()
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1739371697.0629294-164-246873301641437/AnsiballZ_pfsense_interface.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1739371697.0629294-164-246873301641437/AnsiballZ_pfsense_interface.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.pfsensible.core.plugins.modules.pfsense_interface', init_globals=dict(_module_fqn='ansible_collections.pfsensible.core.plugins.modules.pfsense_interface', _modlib_path=modlib_path),
File "<frozen runpy>", line 226, in run_module
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/modules/pfsense_interface.py", line 164, in <module>
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/modules/pfsense_interface.py", line 159, in main
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/module_utils/module_base.py", line 451, in run
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/module_utils/module_base.py", line 419, in _remove
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/module_utils/interface.py", line 337, in _pre_remove_target_elt
File "/tmp/ansible_pfsensible.core.pfsense_interface_payload_ott_knet/ansible_pfsensible.core.pfsense_interface_payload.zip/ansible_collections/pfsensible/core/plugins/module_utils/interface.py", line 387, in _remove_all_separators
TypeError: 'NoneType' object is not iterable
Expected behavior
The interface is deleted without errors.
Environment
What version of pfsensible.core? master 0.7.0 Commit a2f81e2
Describe the bug
We have an existing interface. That should be removed by Ansible with
state: absent
. When running the step fails with:Expected behavior
The interface is deleted without errors.
Environment
Additional context
The code in module_utils/interface.py does not check that no separators exist:
When
find()
does not return anything the iteration is broken :(The text was updated successfully, but these errors were encountered: