Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,5 @@ openwisp2_radius_periodic_tasks: true
openwisp2_usage_metric_collection_periodic_tasks: true
# point {{ inventory_name }} to localhost in /etc/hosts
openwisp2_inventory_hostname_localhost: true
# variable for default deps upgrade
openwisp2_pip_extra_args: "--upgrade"
5 changes: 5 additions & 0 deletions docs/user/role-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ take a look at `the default values of these variables
openwisp2_monitoring_version: "openwisp-monitoring~=1.0.0"
openwisp2_radius_version: "openwisp-radius~=1.0.0"
openwisp2_django_version: "django~=3.2.13"
# Extra arguments passed to pip when reinstalling Python packages with --force-reinstall
# By default, packages are upgraded on each playbook run.
# Can be overridden, for example:
# openwisp2_pip_extra_args: "--upgrade --force-reinstall"
Comment on lines +34 to +37
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Extra arguments passed to pip when reinstalling Python packages with --force-reinstall
# By default, packages are upgraded on each playbook run.
# Can be overridden, for example:
# openwisp2_pip_extra_args: "--upgrade --force-reinstall"
# Extra arguments passed to pip when installing Python packages.
# By default, packages are upgraded on each playbook run.
# Can be overridden, for example:
# openwisp2_pip_extra_args: "--upgrade --force-reinstall"

openwisp2_pip_extra_args: "--upgrade"
# Setting this to true will enable subnet division feature of
# openwisp-controller. Refer openwisp-controller documentation
# for more information. https://github.com/openwisp/openwisp-controller#subnet-division-app
Expand Down
5 changes: 5 additions & 0 deletions tasks/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
requirements: "{{ openwisp2_path }}/requirements.txt"
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_python }}"
extra_args: "{{ openwisp2_pip_extra_args }}"
notify: Reload application
retries: 5
delay: 10
Expand Down Expand Up @@ -122,6 +123,7 @@
requirements: "{{ openwisp2_path }}/requirements-cors-headers.txt"
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_python }}"
extra_args: "{{ openwisp2_pip_extra_args }}"
when: openwisp2_django_cors.get('enabled')
retries: 5
delay: 10
Expand Down Expand Up @@ -153,6 +155,7 @@
requirements: "{{ openwisp2_path }}/requirements-postgresql.txt"
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_python }}"
extra_args: "{{ openwisp2_pip_extra_args }}"
when: openwisp2_database.engine in ["django.db.backends.postgresql", "django.contrib.gis.db.backends.postgis"]
retries: 5
delay: 10
Expand All @@ -171,6 +174,7 @@
requirements: "{{ openwisp2_path }}/requirements-mysql.txt"
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_python }}"
extra_args: "{{ openwisp2_pip_extra_args }}"
when: openwisp2_database.engine in ["django.db.backends.mysql", "django.contrib.gis.db.backends.mysql"]
retries: 5
delay: 10
Expand Down Expand Up @@ -210,6 +214,7 @@
requirements: "{{ openwisp2_path }}/requirements-celery-email.txt"
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_python }}"
extra_args: "{{ openwisp2_pip_extra_args }}"
when: openwisp2_email_backend == "djcelery_email.backends.CeleryEmailBackend"
notify: Reload application
retries: 5
Expand Down
Loading