Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-introduce python installation #985

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Jan 10, 2025

This reverts commit a872e87.

I misread the conditional chain and thought that the original code was only installing python for old Ubuntu versions. But it was just choosing the right python version depending on the Ubuntu version. We can now assume Python 3 and simplify the check.

This reverts commit a872e87.

I misread the conditional chain and thought that the original code was
only installing python for old Ubuntu versions. But it was just choosing
the right python version depending on the Ubuntu version. We can now
assume Python 3 and simplify the check.
@mkllnk mkllnk self-assigned this Jan 10, 2025
- name: Install python
become: yes
raw: |
test -e /usr/bin/python || (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also test for /usr/bin/python3 ? we could skip the install if already there ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we depend on that symlink:

# Set python interpeter to the symlink created by setup
ansible_python_interpreter: '/usr/bin/python'

But we could experiment with removing that config. I would expect Ansible to be clever enough to find any python on the machine.

@dacook dacook merged commit eef03b4 into openfoodfoundation:master Jan 14, 2025
2 checks passed
@mkllnk mkllnk deleted the python branch January 15, 2025 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants