From 9c06d69e6d167d597b4f723f93162c2eac3a8ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Steinm=C3=BCller?= Date: Thu, 7 Feb 2019 17:11:13 +0000 Subject: [PATCH] Add nova_user_pip_packages variable With this variable, users would be able to extend the list of pip packages in case of needing an extra pip package. Currently if we need an extra pip package we need to override the existing list. Depends-On: Idbf2bbbdfb0d2c5c3b440ad37004f5768328e7a6 Change-Id: I7649b3b41bb8f1ae84f51fcb3149dae16501709a --- defaults/main.yml | 3 +++ tasks/nova_install_source.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index b1fb6676..67f4bfc8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -588,6 +588,9 @@ nova_pip_packages: - python-openstackclient - uWSGI +# Specific pip packages provided by the user +nova_user_pip_packages: [] + nova_optional_oslomsg_amqp1_pip_packages: - oslo.messaging[amqp1] diff --git a/tasks/nova_install_source.yml b/tasks/nova_install_source.yml index ba45d227..3729b2c8 100644 --- a/tasks/nova_install_source.yml +++ b/tasks/nova_install_source.yml @@ -44,7 +44,7 @@ venv_install_destination_path: "{{ nova_bin | dirname }}" venv_pip_install_args: "{{ nova_pip_install_args }}" venv_pip_packages: >- - {{ nova_pip_packages + + {{ nova_pip_packages | union(nova_user_pip_packages) + ((nova_services['nova-novncproxy']['group'] in group_names) and (nova_console_type == 'novnc')) | ternary(nova_novnc_pip_packages, []) + (nova_oslomsg_amqp1_enabled | bool) | ternary(nova_optional_oslomsg_amqp1_pip_packages, []) }} venv_facts_when_changed: