Skip to content

Commit c76e7e4

Browse files
author
scrungus
committed
hide images and templates when old
1 parent acdc3f2 commit c76e7e4

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

ansible/openstack-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- images
66
roles:
77
- role: stackhpc.os-images
8-
os_images_venv: "{{ openstack_venv }}"
8+
os_images_venv: "{{ ansible_env.PWD }}/openstack-images-venv"
99
os_images_cache: "{{ ansible_env.PWD }}/openstack-config-image-cache"
1010
os_images_auth_type: "{{ openstack_auth_type }}"
1111
os_images_auth: "{{ openstack_auth }}"

examples/templates/old-images.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
{{ key }}: "{{ value }}"
1616
{% endif %}
1717
{% endfor %}
18+
{% if 'hide_image' not in item.value %}
19+
hide_image: "True"
20+
{% endif %}
1821

1922
{% endif %}
2023
{% endfor %}

examples/templates/old-templates.j2

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
{% if (item.key | replace('_', '-')) not in new_template_data | map(attribute='key') %}
77
{{ item.key }}:
88
{% for key, value in item.value.items() %}
9-
{% if key == 'is_hidden' %}
10-
{{ key }}: {{ value }}
11-
{% elif value is mapping %}
9+
{% if value is mapping %}
1210
{{ key }}:
1311
{% for k, v in value.items() %}
1412
{{ k }}: "{{ v }}"
@@ -18,7 +16,7 @@
1816
{% endif %}
1917
{% endfor %}
2018
{% if 'is_hidden' not in item.value %}
21-
is_hidden: True
19+
is_hidden: True
2220
{% endif %}
2321

2422
{% endif %}

examples/templates/templates.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{% for item in new_template_data %}
55
{{ item.key | replace('-', '_') }}:
66
labels:
7-
monitoring_enabled: "true"
8-
kube_dashboard_enabled: "true"
7+
monitoring_enabled: "True"
8+
kube_dashboard_enabled: "True"
99
capi_helm_chart_version: "{{ magnum_helm_chart_version }}"
1010
octavia_provider: {{ magnum_loadbalancer_provider }}
1111
external_network_id: {{ magnum_external_net_name }}
@@ -15,8 +15,8 @@
1515
name: "{{ item.key }}"
1616
coe: "kubernetes"
1717
network_driver: "calico"
18-
master_lb_enabled: True
19-
floating_ip_enabled: True
18+
master_lb_enabled: "True"
19+
floating_ip_enabled: "True"
2020
dns_nameserver: "1.1.1.1,8.8.8.8,8.8.4.4"
2121
public: True
2222

0 commit comments

Comments
 (0)