From c137253e44859828ce96101978e6dd301335aa95 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 1 Oct 2019 16:37:25 +1000 Subject: [PATCH] dib-functional : allow extra elements to be passed Add a variable to make it easier to add extra elements for testing purposes. Change-Id: Ib246228214beff0aaf2a9cef3df4459657b1e93f --- .zuul.yaml | 7 +++++++ .../templates/nodepool.yaml.j2 | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 1bbc821e1..240a32810 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -35,6 +35,13 @@ The base element to use when building the disk image. + .. zuul:jobvar:: extra_elements + :type: list + :default: [] + + List of extra DIB elements to be added to image + configuration. + .. zuul:jobvar:: release The release number or name to use with the base element. diff --git a/playbooks/nodepool-functional-openstack/templates/nodepool.yaml.j2 b/playbooks/nodepool-functional-openstack/templates/nodepool.yaml.j2 index f5754e2c2..8992d9545 100644 --- a/playbooks/nodepool-functional-openstack/templates/nodepool.yaml.j2 +++ b/playbooks/nodepool-functional-openstack/templates/nodepool.yaml.j2 @@ -46,6 +46,11 @@ diskimages: rebuild-age: 86400 elements: - {{ nodepool_diskimage.base_element }} +{% if 'extra_elements' in nodepool_diskimage %} +{% for item in nodepool_diskimage.extra_elements %} + - {{ item }} +{% endfor %} +{% endif %} - vm - simple-init - growroot