ansible-modules
ansible-modules copied to clipboard
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
I know that this was built 5 years ago, but I'm looking for this exact piece of functionality with ansible :(
Receiving this error:
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 107, in <module>
_ansiballz_main()
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.cloudformation_diff', init_globals=dict(_module_fqn='ansible.modules.cloudformation_diff', _modlib_path=modlib_path),
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/var/folders/q3/bbn7n5hn4xdbkw68fy1pxhyw0000gn/T/ansible_cloudformation_diff_payload_eg0bs710/ansible_cloudformation_diff_payload.zip/ansible/modules/cloudformation_diff.py", line 590, in <module>
File "/var/folders/q3/bbn7n5hn4xdbkw68fy1pxhyw0000gn/T/ansible_cloudformation_diff_payload_eg0bs710/ansible_cloudformation_diff_payload.zip/ansible/modules/cloudformation_diff.py", line 488, in main
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
failed: [localhost] (item=default-routes) => {
"ansible_loop_var": "item",
"changed": false,
"item": {
"accounting": "platform",
"classification": "standard",
"name": "default-routes",
"owner": "devops",
"product": "platform",
"service": "platform"
},
"rc": 1
}
MSG:
MODULE FAILURE
See stdout/stderr for the exact error
MODULE_STDERR:
Traceback (most recent call last):
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 107, in <module>
_ansiballz_main()
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/duffy/.ansible/tmp/ansible-tmp-1663685850.6367428-32076-118898947106338/AnsiballZ_cloudformation_diff.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.cloudformation_diff', init_globals=dict(_module_fqn='ansible.modules.cloudformation_diff', _modlib_path=modlib_path),
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/var/folders/q3/bbn7n5hn4xdbkw68fy1pxhyw0000gn/T/ansible_cloudformation_diff_payload_eg0bs710/ansible_cloudformation_diff_payload.zip/ansible/modules/cloudformation_diff.py", line 590, in <module>
File "/var/folders/q3/bbn7n5hn4xdbkw68fy1pxhyw0000gn/T/ansible_cloudformation_diff_payload_eg0bs710/ansible_cloudformation_diff_payload.zip/ansible/modules/cloudformation_diff.py", line 488, in main
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?```
I'm using macos, python3.10