Merge "Add optional pip packages to horizon"
This commit is contained in:
commit
88cee9cba7
@ -256,6 +256,10 @@ horizon_pip_packages:
|
||||
- sahara_dashboard
|
||||
- trove_dashboard
|
||||
|
||||
# This variable is used to install additional pip packages
|
||||
# that could be needed for additional dashboards
|
||||
horizon_optional_pip_packages: []
|
||||
|
||||
# This variable is used by the repo_build process to determine
|
||||
# which host group to check for members of before building the
|
||||
# pip packages required by this role. The value is picked up
|
||||
|
@ -120,6 +120,22 @@
|
||||
- horizon_get_venv | failed or horizon_developer_mode | bool
|
||||
notify: Restart apache2
|
||||
|
||||
- name: Install optional pip packages
|
||||
pip:
|
||||
name: "{{ horizon_optional_pip_packages | join(' ') }}"
|
||||
state: "{{ horizon_pip_package_state }}"
|
||||
virtualenv: "{{ horizon_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: >-
|
||||
{{ horizon_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }}
|
||||
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
||||
{{ pip_install_options | default('') }}
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when: horizon_optional_pip_packages | length > 0
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
virtualenv-tools --update-path=auto {{ horizon_bin | dirname }}
|
||||
|
Loading…
Reference in New Issue
Block a user