failed: [vm-vpn-prod-0001a] (item=12) => {"ansible_loop_var": "item", "changed": false, "item": 12, "module_stderr": "Traceback (most recent call last):
File \"/home/app/.ansible/tmp/ansible-local-139a965oo/ansible-tmp-1718358053.3592625-747-259437597361998/AnsiballZ_fortios_router_static.py\", line 107, in <module>
_ansiballz_main()
File \"/home/app/.ansible/tmp/ansible-local-139a965oo/ansible-tmp-1718358053.3592625-747-259437597361998/AnsiballZ_fortios_router_static.py\", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File \"/home/app/.ansible/tmp/ansible-local-139a965oo/ansible-tmp-1718358053.3592625-747-259437597361998/AnsiballZ_fortios_router_static.py\", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.fortinet.fortios.plugins.modules.fortios_router_static', init_globals=dict(_module_fqn='ansible_collections.fortinet.fortios.plugins.modules.fortios_router_static', _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_fortinet.fortios.fortios_router_static_payload__1uppy45/ansible_fortinet.fortios.fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py\", line 652, in <module>
File \"/tmp/ansible_fortinet.fortios.fortios_router_static_payload__1uppy45/ansible_fortinet.fortios.fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py\", line 618, in main
File \"/tmp/ansible_fortinet.fortios.fortios_router_static_payload__1uppy45/ansible_fortinet.fortios.fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py\", line 482, in fortios_router
File \"/tmp/ansible_fortinet.fortios.fortios_router_static_payload__1uppy45/ansible_fortinet.fortios.fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py\", line 462, in router_static
KeyError: 'seq-num'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}
This seems to be because in fortios_router_static.py:462 there is a reference to seq-num in a dictionary where all hyphens are converted to underscores (so it should be seq_num).
After changing the hyphen to underscore in the code; it can remove routes:
Code:
Gives the following error:
This seems to be because in fortios_router_static.py:462 there is a reference to
seq-num
in a dictionary where all hyphens are converted to underscores (so it should beseq_num
).After changing the hyphen to underscore in the code; it can remove routes: