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
TASK [SCALEWAY_SECRET_VERSION | Get SSH public key] ****************************
task path: /homexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx.yml:21
Read vars_file './xxxxxxxxxxxxxxxxxxxxx/scaleway.yml'
Using module file /home/xxxxxxxxxxxxxxxxxx/.cache/ansible-compat/0cb87f/collections/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py
Pipelining is enabled.
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: xxxxxxxxxx
<localhost> EXEC /bin/sh -c '/home/xxxxxxxxxxxxxxxxxxxxxxxxx/venv/bin/python && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "<stdin>", line 107, in <module>
File "<stdin>", line 99, in _ansiballz_main
File "<stdin>", line 47, in invoke_module
File "/usr/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py", line 389, in <module>
File "/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py", line 385, in main
File "/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py", line 320, in core
File "/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py", line 164, in create
AttributeError: 'NoneType' object has no attribute 'encode'
fatal: [golden-image -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 47, in invoke_module\n File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py\", line 389, in <module>\n File \"/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py\", line 385, in main\n File \"/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py\", line 320, in core\n File \"/tmp/ansible_scaleway.scaleway.scaleway_secret_version_payload_6za0lq3b/ansible_scaleway.scaleway.scaleway_secret_version_payload.zip/ansible_collections/scaleway/scaleway/plugins/modules/scaleway_secret_version.py\", line 164, in create\nAttributeError: 'NoneType' object has no attribute 'encode'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Hi,
I would like to get a secret value from a name.
When using your doc (https://github.com/scaleway/ansible/blob/2.5.0/plugins/modules/scaleway_secret_version.py#L95), i have this error:
My offending code:
While reading the source code, I think the main problem is https://github.com/scaleway/ansible/blob/2.5.0/plugins/modules/scaleway_secret_version.py#L337 The default value for
state
should beaccess
. Or maybe fix the doc?To bypass this issue, this updated code works:
Other infos:
Best regards,
Emilien Mantel
The text was updated successfully, but these errors were encountered: