ansible / community

This repository is being archived. See https://github.com/ansible-community/presentations and https://github.com/ansible-community/meetings for the new locations
Apache License 2.0
489 stars 144 forks source link

scaleway #630

Closed bioinfornatics closed 3 years ago

bioinfornatics commented 3 years ago

Dear,

I tried to use scaleway-cli through ansible without succss Indeed with following ansible statements

      scaleway_compute:
        name: 'someone.com'
        state: 'present'
        # Roxky Linux 8
        image: '3fdb4082-cab9-4802-ae0b-3c18dcc59281'
        organization: 'a87e2eb1-92e3-40ab-80d2-9ccd95c33dac'
        region: 'par1'
        commercial_type: 'DEV1-M'
        public_ip: 'XX.YY.ZZ.AA'
        security_group: 'xxxx-xxx-xxxx-xxxxx'
        wait: true

An error message is raised


The full traceback is:
Traceback (most recent call last):
  File "/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py", line 100, in <module>
    _ansiballz_main()
  File "/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py", line 92, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.scaleway_compute', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.scaleway_compute', _modlib_path=modlib_path),
  File "/usr/lib/python3.9/runpy.py", line 210, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec&#40;code, run_globals&#41;
  File "/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py", line 673, in <module>
  File "/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py", line 669, in main
  File "/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py", line 641, in core
TypeError: 'NoneType' object is not iterable
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py\", line 100, in <module>\n    _ansiballz_main()\n  File \"/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py\", line 92, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/jonathan/.ansible/tmp/ansible-tmp-1631547906.8553545-19198-189669113758992/AnsiballZ_scaleway_compute.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.scaleway_compute', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.scaleway_compute', _modlib_path=modlib_path),\n  File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n    exec&#40;code, run_globals&#41;\n  File \"/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py\", line 673, in <module>\n  File \"/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py\", line 669, in main\n  File \"/tmp/ansible_scaleway_compute_payload_qqsr2ljv/ansible_scaleway_compute_payload.zip/ansible_collections/community/general/plugins/modules/scaleway_compute.py\", line 641, in core\nTypeError: 'NoneType' object is not iterable\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1

Moreover in order to use this ansible module we have define the SCW_TOKEN variable nonetheless this variable is deprecated and scaleway use now SCW_SECRET_KEY

Thanks to keep updated this module

best regards

bioinfornatics commented 3 years ago

wrong repo sorry