Running f5os_lldp_config requires the system config to already have a system name set in LLDP.
If the name is not set, the module fails. If the system-name pre-exists, the module runs fine.
STEPS TO REPRODUCE
Have a blank F5OS system with LLDP system-name not set.
Run a playbook.
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py", line 107, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_lldp_config', init_globals=dict(_module_fqn='ansible_collections.f5networks.f5os.plugins.modules.f5os_lldp_config', _modlib_path=modlib_path),
File "/usr/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py", line 726, in <module>
File "/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py", line 719, in main
File "/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py", line 450, in exec_module
File "/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py", line 463, in present
File "/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py", line 637, in exists
KeyError: 'system-name'
fatal: [10.170.9.37]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py\", line 107, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-local-46775i6oqwvh/ansible-tmp-1719219843.769013-4915-218168108677903/AnsiballZ_f5os_lldp_config.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_lldp_config', init_globals=dict(_module_fqn='ansible_collections.f5networks.f5os.plugins.modules.f5os_lldp_config', _modlib_path=modlib_path),\n File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py\", line 726, in <module>\n File \"/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py\", line 719, in main\n File \"/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py\", line 450, in exec_module\n File \"/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py\", line 463, in present\n File \"/tmp/ansible_f5os_lldp_config_payload_wt_ke_ah/ansible_f5os_lldp_config_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_lldp_config.py\", line 637, in exists\nKeyError: 'system-name'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
COMPONENT NAME
f5os_lldp_config
Environment
ANSIBLE VERSION
F5OS VERSION
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
Running f5os_lldp_config requires the system config to already have a system name set in LLDP. If the name is not set, the module fails. If the system-name pre-exists, the module runs fine.
STEPS TO REPRODUCE
Have a blank F5OS system with LLDP system-name not set. Run a playbook.
EXPECTED RESULTS
Enables LLDP and sets the system name.
ACTUAL RESULTS