You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
When trying to use sensu_go_check with ansible 2.7.4, and sensu-go 5.0.0 I get a module failure. Further debugging shows me:
root@vps216011:/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/debug_dir# /tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/AnsiballZ_sensu_go_check.py execute
Traceback (most recent call last):
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/AnsiballZ_sensu_go_check.py", line 261, in <module>
_ansiballz_main()
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/AnsiballZ_sensu_go_check.py", line 248, in _ansiballz_main
exitcode = debug(sys.argv[1], zipped_mod, ANSIBALLZ_PARAMS)
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/AnsiballZ_sensu_go_check.py", line 216, in debug
importer = imp.load_module('__main__', f, script_path, ('.py', 'r', imp.PY_SOURCE))
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 170, in load_source
module = _exec(spec, sys.modules[name])
File "<frozen importlib._bootstrap>", line 618, in _exec
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/debug_dir/__main__.py", line 191, in <module>
main()
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/debug_dir/__main__.py", line 188, in main
run_module()
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/debug_dir/__main__.py", line 141, in run_module
check_names = [check['name'] for check in checks]
File "/tmp/.ansible-root/tmp/ansible-tmp-1544296249.73-277063188930744/debug_dir/__main__.py", line 141, in <listcomp>
check_names = [check['name'] for check in checks]
KeyError: 'name'
Outputting 'check list' with json shows that 'name' key has moved under metadata dictionary:
metadata dict was created to contain name, namespace in the
first stable release of sensu-go. move name reference to the
dict.
this fixes issue jaredledvina#21
Hello!
When trying to use sensu_go_check with ansible 2.7.4, and sensu-go 5.0.0 I get a module failure. Further debugging shows me:
Outputting 'check list' with json shows that 'name' key has moved under metadata dictionary:
I changed:
check_names = [check['name'] for check in checks]
To:
check_names = [check['metadata']['name'] for check in checks]
But I'm not sure that's the proper approach, but it's working for me now!
The text was updated successfully, but these errors were encountered: