F5 OS API does not return operation-id for file import operations until F5OS 1.7.0, so all previous versions return an exception even though the image import task starts successfully.
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py", line 107, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_system_image_import', init_globals=dict(_module_fqn='ansible_collections.f5networks.f5os.plugins.modules.f5os_system_image_import', _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_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 512, in <module>
File "/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 505, in main
File "/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 239, in exec_module
File "/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 257, in import_image
File "/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 282, in create
File "/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py", line 326, in create_on_device
KeyError: 'operation-id'
fatal: [10.154.86.36]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py\", line 107, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-local-6976px2pu1/ansible-tmp-1727145163.9415436-72-26526712713256/AnsiballZ_f5os_system_image_import.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_system_image_import', init_globals=dict(_module_fqn='ansible_collections.f5networks.f5os.plugins.modules.f5os_system_image_import', _modlib_path=modlib_path),\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 512, in <module>\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 505, in main\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 239, in exec_module\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 257, in import_image\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 282, in create\n File \"/tmp/ansible_f5networks.f5os.f5os_system_image_import_payload_ervcppea/ansible_f5networks.f5os.f5os_system_image_import_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_system_image_import.py\", line 326, in create_on_device\nKeyError: 'operation-id'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
COMPONENT NAME
f5os.f5os_system_image_import
Environment
ANSIBLE VERSION
F5OS VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
F5 OS API does not return operation-id for file import operations until F5OS 1.7.0, so all previous versions return an exception even though the image import task starts successfully.
STEPS TO REPRODUCE
EXPECTED RESULTS
Image imported and playbook continues.
ACTUAL RESULTS
Playbook exceptions and fails, image does import.