gdevenyi / NeuroAnsible

An ansible playbook to deploy a complete standalone neuroimaging workstation
GNU General Public License v3.0
20 stars 0 forks source link

Ubuntu 24.04 doesn't provide /usr/bin/python symlink/binary #27

Closed egarza closed 1 week ago

egarza commented 1 week ago

I made a clean install of Ubuntu 24.04 LTS in WSL.

I installed Ansible succesfully. Python3 is aliased as Python

After the first steps, when I get to this one I get this error:

ansible-playbook --ask-become-pass deploy.yml

egarza@CAMUS:~/NeuroAnsible$ ansible-playbook --ask-become-pass deploy.yml
BECOME password:

PLAY [workstations] ***********************************************************************************************

TASK [Gathering Facts] ********************************************************************************************
fatal: [localhost]: FAILED! => changed=false
  ansible_facts: {}
  failed_modules:
    ansible.legacy.setup:
      failed: true
      module_stderr: |2-

        /usr/bin/env: ‘python’: No such file or directory
      module_stdout: ''
      msg: |-
        MODULE FAILURE
        See stdout/stderr for the exact error
      rc: 127
  msg: |-
    The following modules failed to execute: ansible.legacy.setup

PLAY RECAP ********************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

Thanks,

Ed

gdevenyi commented 1 week ago

Python3 is aliased as Python

I don't know what you did, but the proper way to do this system wide is to install a specific package apt install python-is-python3

I have no idea why Ubuntu decided to not provide a proper python binary name. I'm overriding the ansible python autodetection, so i'll remove it.

gdevenyi commented 1 week ago

Fixed by 926e0e50f1fa47c2469422f05fa9cecaa38fc5cf