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

Fix checking for Python version <3.7 #407

Merged

Conversation

emsu-io-suefke
Copy link
Contributor

Running
$ ansible-playbook -i hosts playbook.yml -u user --check would always result in an error because the variable {{openwisp2_installed_python}} would never have been set when running with --check.

It is Ansible best practice to use Ansible native checks wherever possible and it is reasonable to assume that Ansible runs in the Python version the system has. For Python version checking, see https://serverfault.com/a/858684

Another change is to install >= Python 3.7 only if < Python 3.7 is found. The old expression looks as if it would install deadsnakes-python3.7 over system python3.7

Related to issue #400

Running
$ ansible-playbook -i hosts playbook.yml -u user --check
would always result in an error because the variable
{{openwisp2_installed_python}} would never have been set when running
with --check.

It is Ansible best practice to use Ansible native checks wherever possible
and it is reasonable to assume that Ansible runs in the Python version the
system has. For Python version checking, see https://serverfault.com/a/858684

Another change is to install >= Python 3.7 only if < Python 3.7 is found.
The old expression would install deadsnakes-python3.7 over system python3.7
@mikysal78
Copy link

When will the merge be done?
As of today, if you don't have ubuntu, you can't upgrade or install!

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@nemesifier nemesifier merged commit b50ef79 into openwisp:master Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants