ara_api role: provide sensible PATH defaults without venv
When deploying without a virtualenv, we need to supply a PATH where the python and ara-manage binaries are likely to be found. Change-Id: Ie9b498f988a026a2568cc445ef444fe2f90c837b
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
block:
|
||||
- name: Generate a random secret key
|
||||
environment:
|
||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||
PATH: "{{ path_with_virtualenv | default('/usr/bin:/usr/local/bin') }}"
|
||||
command: python3 -c "from django.utils.crypto import get_random_string; print(get_random_string(length=50))"
|
||||
no_log: yes
|
||||
register: generated_key
|
||||
|
@@ -45,5 +45,5 @@
|
||||
- name: Run SQL migrations
|
||||
environment:
|
||||
ARA_SETTINGS: "{{ ara_api_settings }}"
|
||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||
PATH: "{{ path_with_virtualenv | default('/usr/bin:/usr/local/bin') }}"
|
||||
command: ara-manage migrate
|
||||
|
@@ -45,5 +45,5 @@
|
||||
- name: Run SQL migrations
|
||||
environment:
|
||||
ARA_SETTINGS: "{{ ara_api_settings }}"
|
||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||
PATH: "{{ path_with_virtualenv | default('/usr/bin:/usr/local/bin') }}"
|
||||
command: ara-manage migrate
|
||||
|
@@ -26,5 +26,5 @@
|
||||
become: "{{ (ansible_user_dir in ara_api_database_name) | ternary(false, true) }}"
|
||||
environment:
|
||||
ARA_SETTINGS: "{{ ara_api_settings }}"
|
||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||
PATH: "{{ path_with_virtualenv | default('/usr/bin:/usr/local/bin') }}"
|
||||
command: ara-manage migrate
|
||||
|
@@ -49,8 +49,8 @@
|
||||
|
||||
- name: Get ARA plugins directory
|
||||
environment:
|
||||
PATH: "{{ path_with_virtualenv | default(omit) }}"
|
||||
command: python -m ara.setup.plugins
|
||||
PATH: "{{ path_with_virtualenv | default('/usr/bin:/usr/local/bin') }}"
|
||||
command: python3 -m ara.setup.plugins
|
||||
changed_when: false
|
||||
register: ara_setup_plugins
|
||||
|
||||
|
Reference in New Issue
Block a user