When environment variables are passed to the Goss executable, they are not converted into strings. This is the aforementioned issue in #12:
Traceback (most recent call last):
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 96, in <module>
main()
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 88, in main
rc, stdout, stderr = evaluate(module, test_file, fmt, executable, env_vars)
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 52, in evaluate
environ_update=env_vars
File "/tmp/ansible_DzKBAW/ansible_modlib.zip/ansible/module_utils/basic.py", line 2328, in run_command
File "/usr/lib/python2.7/os.py", line 471, in __setitem__
putenv(key, item)
TypeError: must be string, not bool
Traceback (most recent call last):
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 96, in <module>
main()
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 88, in main
rc, stdout, stderr = evaluate(module, test_file, fmt, executable, env_vars)
File "/tmp/ansible_DzKBAW/ansible_module_goss.py", line 52, in evaluate
environ_update=env_vars
File "/tmp/ansible_DzKBAW/ansible_modlib.zip/ansible/module_utils/basic.py", line 2328, in run_command
File "/usr/lib/python2.7/os.py", line 471, in __setitem
putenv(key, item)
TypeError: must be string, not bool
Essentially, I was passing a raw YAML boolean into the environment variables dictionary, and these values should be sanitized to strings before starting the process.
Acceptance Criteria
[ ] The underlying goss module must serialize each environment variable's key and value into a string.
When environment variables are passed to the Goss executable, they are not converted into strings. This is the aforementioned issue in #12:
Essentially, I was passing a raw YAML boolean into the environment variables dictionary, and these values should be sanitized to strings before starting the process.
Acceptance Criteria
goss
module must serialize each environment variable's key and value into a string.