Skip to content

Instantly share code, notes, and snippets.

@Craigson
Created February 19, 2021 00:53
Show Gist options
  • Save Craigson/7ffe48f483fd480f8feb16f3417cc21c to your computer and use it in GitHub Desktop.
Save Craigson/7ffe48f483fd480f8feb16f3417cc21c to your computer and use it in GitHub Desktop.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'network'
fatal: [localhost]: FAILED! => changed=false
attempts: 3
module_stderr: |-
Traceback (most recent call last):
File "/tmp/ansible-craig/ansible-tmp-1613695864.793667-76876-208000978950/AnsiballZ_syntropy_template.py", line 102, in <module>
_ansiballz_main()
File "/tmp/ansible-craig/ansible-tmp-1613695864.793667-76876-208000978950/AnsiballZ_syntropy_template.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/tmp/ansible-craig/ansible-tmp-1613695864.793667-76876-208000978950/AnsiballZ_syntropy_template.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.syntropynet.syntropy.plugins.modules.syntropy_template', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/folders/v1/4dy43cf910vgs28_sw149v8c0000gn/T/ansible_syntropynet.syntropy.syntropy_template_payload_cw5j048i/ansible_syntropynet.syntropy.syntropy_template_payload.zip/ansible_collections/syntropynet/syntropy/plugins/modules/syntropy_template.py", line 169, in <module>
File "/var/folders/v1/4dy43cf910vgs28_sw149v8c0000gn/T/ansible_syntropynet.syntropy.syntropy_template_payload_cw5j048i/ansible_syntropynet.syntropy.syntropy_template_payload.zip/ansible_collections/syntropynet/syntropy/plugins/modules/syntropy_template.py", line 136, in main
File "/usr/local/lib/python3.7/site-packages/syntropynac/configure.py", line 565, in configure_network
api, networks[0], config, dry_run, silent=silent
File "/usr/local/lib/python3.7/site-packages/syntropynac/configure.py", line 387, in configure_network_update
for connection in connections
File "/usr/local/lib/python3.7/site-packages/syntropynac/configure.py", line 388, in <listcomp>
if connection["network"]["network_id"] == network[ConfigFields.ID]
KeyError: 'network'
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment