-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathimages.j2
More file actions
30 lines (28 loc) · 1.01 KB
/
images.j2
File metadata and controls
30 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
###############################################################################
# Configuration of Glance software images.
{% for item in new_template_data %}
# Image for {{ item.key }}
{{ item.value.name | replace('-', '_') | replace('.', '_') }}:
name: "{{ item.value.name }}"
type: qcow2
image_url: "{{ item.value.url }}"
visibility: "community"
properties:
os_distro: "ubuntu"
os_version: "20.04"
kube_version: "{{ item.value.kubernetes_version }}"
{% endfor %}
# List of Kubernetes images. Format is as required by the stackhpc.os-images role.
kubernetes_images:
{% if matching_images is defined and matching_temps | length > 0 %}
# Old Images
{% for item in matching_images %}
{% if (item.value.name | replace('_', '-')) not in (new_template_data | map(attribute='value.name')) %}
- "{{ '{{ ' + item.key + ' }}' }}"
{% endif %}
{% endfor %}
{% endif %}
# New Images
{% for item in new_template_data %}
- "{{ '{{ ' + (item.value.name | replace('-', '_')) | replace('.', '_') + ' }}' }}"
{% endfor %}