robertdebock / ansible-role-ara

Install and configure ara on your system.
https://robertdebock.nl/
Apache License 2.0
6 stars 3 forks source link

install fails at `TASK [robertdebock.ara : try python2]` #5

Open blaisep opened 2 years ago

blaisep commented 2 years ago

Describe the bug

After installing all the requirements, the ara role fails to install.

Playbook

$ ansible-playbook -K ara.yml

Please paste the playbook you are using. (Consider requirements.yml and optionally the command you've invoked.)

---
- name: Install ara
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.ara

I tried both of these inventory: localhost ansible_connection=local ansible_python_interpreter=/home/blaise/venv/bin/python and localhost ansible_connection=local ansible_python_interpreter=/home/blaise/venv/bin/python3

Output

TASK [robertdebock.ara : try python2] **********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["python", "-m", "ara.setup.callback_plugins"], "delta": "0:00:00.033111", "end": "2022-01-09 23:26:36.202636", "msg": "non-zero return code", "rc": 1, "start": "2022-01-09 23:26:36.169525", "stderr": "/usr/bin/python: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')", "stderr_lines": ["/usr/bin/python: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')"], "stdout": "", "stdout_lines": []}

TASK [robertdebock.ara : try python3] **********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["python3", "-m", "ara.setup.callback_plugins"], "delta": "0:00:00.030415", "end": "2022-01-09 23:26:36.593164", "msg": "non-zero return code", "rc": 1, "start": "2022-01-09 23:26:36.562749", "stderr": "/usr/bin/python3: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')", "stderr_lines": ["/usr/bin/python3: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')"], "stdout": "", "stdout_lines": []}

Environment

blaisep commented 2 years ago

@robertdebock , if you can suggest how to troubleshoot, I'm happy to troubleshoot and file a PR.

I have decided to build my new homelab from bootstrap using your roles, so I'm eager to learn.

robertdebock commented 2 years ago

Hi @blaisep!

Hm, I never really thought of the situation that you are in; using a custom path to python.

The vars/main.yml file has these commands:

ara_setup_command_python2: python -m ara.setup.callback_plugins
ara_setup_command_python3: python3 -m ara.setup.callback_plugins

What's missing is a custom path.

I think what's required is to use ansible_python_interpreter instead of that map in vars/main.yml. Give me a moment to try a few things and get back to you.

Regards,

Robert de Bock.

blaisep commented 2 years ago

Hm, I never really thought of the situation that you are in; using a custom path to python.

Oh, how funny! I thought I was following your suggestions at https://robertdebock.nl/how-to-use-these-roles.html#ansible-cfg and I wanted to make sure that I used the venv python interpreter.

On Tue, Jan 11, 2022 at 2:23 PM Robert de Bock @.***> wrote:

Hi @blaisep https://github.com/blaisep!

Hm, I never really thought of the situation that you are in; using a custom path to python.

The vars/main.yml file has these commands:

ara_setup_command_python2: python -m ara.setup.callback_pluginsara_setup_command_python3: python3 -m ara.setup.callback_plugins

What's missing is a custom path.

I think what's required is to use ansible_python_interpreter instead of that map in vars/main.yml. Give me a moment to try a few things and get back to you.

Regards,

Robert de Bock.

— Reply to this email directly, view it on GitHub https://github.com/robertdebock/ansible-role-ara/issues/5#issuecomment-1010286688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB6D6A7IOEKJROPZXH2WNDUVR7SVANCNFSM5LSX5O2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- LinkedIn https://www.linkedin.com/in/blaisepabon/ | Quora https://www.quora.com/profile/Blaise-Pabon | Github https://github.com/blaisep “If you want to go fast, go alone. If you want to go far, go together.” --African proverb