ShubhamTatvamasi / magma-galaxy

https://galaxy.ansible.com/shubhamtatvamasi/magma
BSD 3-Clause "New" or "Revised" License
13 stars 20 forks source link

Task Add rke public SSH key to authorized keys list errors out with TypeError #8

Closed btsimon97 closed 1 year ago

btsimon97 commented 1 year ago

The Ansible playbook to deploy orchestrator errors out with a TypeError in deprecated() Full error message is below:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: deprecated() got an unexpected keyword argument 'name'
fatal: [192.168.0.3]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 192.168.0.3 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/magma/.ansible/tmp/ansible-tmp-1666013327.7767842-18272-152908292477440/AnsiballZ_authorized_key.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/magma/.ansible/tmp/ansible-tmp-1666013327.7767842-18272-152908292477440/AnsiballZ_authorized_key.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/magma/.ansible/tmp/ansible-tmp-1666013327.7767842-18272-152908292477440/AnsiballZ_authorized_key.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible_collections.ansible.posix.plugins.modules.authorized_key', init_globals=dict(_module_fqn='ansible_collections.ansible.posix.plugins.modules.authorized_key', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_authorized_key_payload_q71kfz7q/ansible_authorized_key_payload.zip/ansible_collections/ansible/posix/plugins/modules/authorized_key.py\", line 223, in <module>\r\n  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 975, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 655, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 618, in _load_backward_compatible\r\n  File \"<frozen zipimport>\", line 259, in load_module\r\n  File \"/tmp/ansible_authorized_key_payload_q71kfz7q/ansible_authorized_key_payload.zip/ansible/module_utils/urls.py\", line 115, in <module>\r\n  File \"/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py\", line 50, in <module>\r\n    import OpenSSL.SSL\r\n  File \"/home/magma/.local/lib/python3.8/site-packages/OpenSSL/__init__.py\", line 8, in <module>\r\n    from OpenSSL import SSL, crypto\r\n  File \"/home/magma/.local/lib/python3.8/site-packages/OpenSSL/SSL.py\", line 19, in <module>\r\n    from OpenSSL.crypto import (\r\n  File \"/home/magma/.local/lib/python3.8/site-packages/OpenSSL/crypto.py\", line 3224, in <module>\r\n    utils.deprecated(\r\nTypeError: deprecated() got an unexpected keyword argument 'name'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
jao-tm commented 1 year ago

Had the same issue, seems to be a openSSL issue. I uninstalled pyOpenSSL and installed version 22.0.0 using pip3 install pyOpenSSL==22.0.0. Maybe this should be added to the prerequisites?

ShubhamTatvamasi commented 1 year ago

Where are you deploying this?

ShubhamTatvamasi commented 1 year ago

I have just deployed on a fresh instance, use the code below. Installation was fine. Please send your error logs, so I can help you further. https://github.com/ShubhamTatvamasi/terraform-aws-magma-galaxy

jao-tm commented 1 year ago

I deployed in an Ubuntu 20.04 VM, not AWS. The repository you linked to is the terraform AWS project

ShubhamTatvamasi commented 1 year ago

Are you using KVM?

jao-tm commented 1 year ago

No, Virtualbox

btsimon97 commented 1 year ago

We also used an Ubuntu 20.04 VM, but on VMware ESXi/vSphere, not VirtualBox.

ShubhamTatvamasi commented 1 year ago

I have not tested this on VMware ESXi/vSphere. If you want, we can set up a Zoom call to deploy on your environment.

btsimon97 commented 1 year ago

That would be great. I can send out a Zoom meeting invitation with a time that would work, is the email address on your GitHub profile a good one to send it to?

ShubhamTatvamasi commented 1 year ago

Sure, that works.

ShubhamTatvamasi commented 1 year ago

Got it, Thanks.

ShubhamTatvamasi commented 1 year ago

Hi @btsimon97, is your issue resolved now?