Merge "Add optional pip packages to horizon"

This commit is contained in:
Jenkins 2016-11-07 14:31:19 +00:00 committed by Gerrit Code Review
commit 88cee9cba7
2 changed files with 20 additions and 0 deletions

View File

@ -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

View File

@ -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 }}