Browse Source

Add magnum_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: Iaa94479ea780aa0b79b880327b807223f66874d6
changes/32/638232/3
Guilherme Steinmüller 3 months ago
parent
commit
da833077e0
2 changed files with 5 additions and 1 deletions
  1. 3
    0
      defaults/main.yml
  2. 2
    1
      tasks/magnum_install.yml

+ 3
- 0
defaults/main.yml View File

@@ -160,6 +160,9 @@ magnum_pip_packages:
160 160
   - python-memcached
161 161
   - uwsgi
162 162
 
163
+# Specific pip packages provided by the user
164
+magnum_user_pip_packages: []
165
+
163 166
 magnum_optional_oslomsg_amqp1_pip_packages:
164 167
   - oslo.messaging[amqp1]
165 168
 

+ 2
- 1
tasks/magnum_install.yml View File

@@ -42,7 +42,8 @@
42 42
     venv_install_destination_path: "{{ magnum_bin | dirname }}"
43 43
     venv_install_distro_package_list: "{{ magnum_distro_packages }}"
44 44
     venv_pip_install_args: "{{ magnum_pip_install_args }}"
45
-    venv_pip_packages: "{{ (magnum_oslomsg_amqp1_enabled | bool) | ternary(magnum_pip_packages + magnum_optional_oslomsg_amqp1_pip_packages, magnum_pip_packages) }}"
45
+    venv_pip_packages: "{{ magnum_pip_packages | union(magnum_user_pip_packages) +
46
+    (magnum_oslomsg_amqp1_enabled | bool) | ternary(magnum_optional_oslomsg_amqp1_pip_packages, []) }}"
46 47
     venv_facts_when_changed:
47 48
       - section: "magnum"
48 49
         option: "venv_tag"

Loading…
Cancel
Save