Closed Natscho2001 closed 5 months ago
Thanks for reporting this. We will take a look.
Can you confirm the state of the network interface before you ran this failing playbook task?
@Natscho2001 please upgrade to the latest FlashArray collection and then apply this patch. This should then resolve your issue.
Thanks for your reply, but that did not fix the issue. This is a brand new FlashArray, all interfaces are configured by default.
I update the collection successfully
ansible-galaxy collection install -U -f purestorage.flasharray
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading
purestorage.flasharray:1.28.0 was installed successfully
An added the lines provided
322- if not current_state["address"]:
323: current_state["address"] = "0.0.0.0"
--
384- if not address:
385: address = "0.0.0.0"
But still get
Traceback (most recent call last):
File \"/home/../.ansible/tmp/ansible-tmp-1714978601.4099014-513915-231433368316548/AnsiballZ_purefa_network.py\", line 107, in <module>
_ansiballz_main()
File \"/home/../.ansible/tmp/ansible-tmp-1714978601.4099014-513915-231433368316548/AnsiballZ_purefa_network.py\", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File \"/home/../.ansible/tmp/ansible-tmp-1714978601.4099014-513915-231433368316548/AnsiballZ_purefa_network.py\", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.purestorage.flasharray.plugins.modules.purefa_network', init_globals=dict(_module_fqn='ansible_collections.purestorage.flasharray.plugins.modules.purefa_network', _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_purestorage.flasharray.purefa_network_payload__e2_ayub/ansible_purestorage.flasharray.purefa_network_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_network.py\", line 773, in <module>
File \"/tmp/ansible_purestorage.flasharray.purefa_network_payload__e2_ayub/ansible_purestorage.flasharray.purefa_network_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_network.py\", line 743, in main
File \"/tmp/ansible_purestorage.flasharray.purefa_network_payload__e2_ayub/ansible_purestorage.flasharray.purefa_network_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_network.py\", line 344, in update_interface
File \"/home/../.local/lib/python3.11/site-packages/netaddr/strategy/ipv4.py\", line 99, in valid_str
raise TypeError('Invalid type: %s' % type(addr))
TypeError: Invalid type: <class 'NoneType'>
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}
Describe the bug I try to configure an interface but run into an error:
To Reproduce Steps to reproduce the behavior:
Create a task:
Add vars to inventory:
Run the playbook
Reference for task from the docs
Expected behavior
The given interface should be configured with the IP. In this case, it should delete an existing IP configuration.
Desktop (please complete the following information):