Browse Source

Add glance_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.

Change-Id: I59bd71a581b23574323db55f0f16194e7788e22e
changes/29/638229/2
Guilherme Steinmüller 3 months ago
parent
commit
e24fe31e2e
2 changed files with 5 additions and 1 deletions
  1. 3
    0
      defaults/main.yml
  2. 2
    1
      tasks/glance_install_source.yml

+ 3
- 0
defaults/main.yml View File

@@ -263,6 +263,9 @@ glance_pip_packages:
263 263
   - uwsgi
264 264
   - warlock
265 265
 
266
+# Specific pip packages provided by the user
267
+glance_user_pip_packages: []
268
+
266 269
 glance_optional_oslomsg_amqp1_pip_packages:
267 270
   - oslo.messaging[amqp1]
268 271
 

+ 2
- 1
tasks/glance_install_source.yml View File

@@ -43,7 +43,8 @@
43 43
     venv_install_destination_path: "{{ glance_bin | dirname }}"
44 44
     venv_install_distro_package_list: "{{ glance_distro_packages }}"
45 45
     venv_pip_install_args: "{{ glance_pip_install_args }}"
46
-    venv_pip_packages: "{{ (glance_oslomsg_amqp1_enabled | bool) | ternary(glance_pip_packages + glance_optional_oslomsg_amqp1_pip_packages, glance_pip_packages) }}"
46
+    venv_pip_packages: "{{ glance_pip_packages | union(glance_user_pip_packages) +
47
+    (glance_oslomsg_amqp1_enabled | bool) | ternary(glance_optional_oslomsg_amqp1_pip_packages, []) }}"
47 48
     venv_facts_when_changed:
48 49
       - section: "glance"
49 50
         option: "need_service_restart"

Loading…
Cancel
Save