Skip to content

Commit 298b526

Browse files
authored
Merge pull request #185 from YPCrumble/feature/pip-upgrade-flag
Add an optional flag to use pip's --upgrade flag for installing depen…
2 parents 437a815 + 5b75119 commit 298b526

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

roles/web/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project_path: "{{ virtualenv_path }}/{{ project_name }}"
1212
application_log_dir: "{{ virtualenv_path }}/logs"
1313
application_log_file: "{{ application_log_dir }}/gunicorn_supervisor.log"
1414
requirements_file: "{{ project_path }}/requirements.txt"
15+
pip_use_upgrade_flag: false
1516

1617

1718
# Gunicorn settings.

roles/web/tasks/setup_django_app.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22

33
- name: Install packages required by the Django app inside virtualenv
4-
pip: virtualenv={{ virtualenv_path }} requirements={{ requirements_file }}
4+
pip:
5+
virtualenv: "{{ virtualenv_path }}"
6+
requirements: "{{ requirements_file }}"
7+
extra_args: "{{ pip_use_upgrade_flag | ternary('--upgrade', omit) }}"
58

69
- name: Run the Django syncdb command
710
django_manage:

0 commit comments

Comments
 (0)