Skip to content

Commit f375761

Browse files
committed
Automate Kolla Ansible tag variable definitions
1 parent 297fa2c commit f375761

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

etc/kayobe/kolla-image-tags.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Dict of Kolla image tags to deploy for each service.
3+
# Each key is the tag variable prefix name, and the value is another dict,
4+
# where the key is the OS distro and the value is the tag to deploy.
5+
kolla_image_tags:
6+
openstack:
7+
rocky: zed-rocky-9-20230821T155947
8+
ubuntu: zed-ubuntu-jammy-20230821T155947
9+
prometheus:
10+
rocky: zed-rocky-9-20230913T160425

etc/kayobe/kolla/globals.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ enable_docker_repo: "{% raw %}{{ 'overcloud' not in group_names or ansible_facts
1010
# This is necessary for os migrations where mixed clouds might be deployed
1111
kolla_base_distro: "{% raw %}{{ ansible_facts.distribution | lower }}{% endraw %}"
1212

13-
kayobe_image_tags:
14-
openstack:
15-
rocky: zed-rocky-9-20230821T155947
16-
ubuntu: zed-ubuntu-jammy-20230821T155947
17-
prometheus:
18-
rocky: zed-rocky-9-20230913T160425
19-
20-
openstack_tag: "{% raw %}{{ kayobe_image_tags['openstack'][kolla_base_distro] }}{% endraw %}"
21-
prometheus_tag: "{% raw %}{{ kayobe_image_tags['prometheus'][kolla_base_distro] | default(openstack_tag) }}{% endraw %}"
13+
# Dict of Kolla image tags to deploy for each service.
14+
# Each key is the tag variable prefix name, and the value is another dict,
15+
# where the key is the OS distro and the value is the tag to deploy.
16+
# NOTE: This is defined in etc/kayobe/kolla-image-tags.yml.
17+
kolla_image_tags:
18+
{{ kolla_image_tags | to_nice_yaml(indent=2) }}
19+
20+
{% for tag in kolla_image_tags %}
21+
{% if tag == 'openstack' %}
22+
{{ tag }}_tag: "{% raw %}{{ kolla_image_tags['{% endraw %}{{ tag }}{% raw %}'][kolla_base_distro] }}{% endraw %}"
23+
{% else %}
24+
{{ tag }}_tag: "{% raw %}{{ kolla_image_tags['{% endraw %}{{ tag }}{% raw %}'][kolla_base_distro] | default(openstack_tag) }}{% endraw %}"
25+
{% endif %}
26+
{% endfor %}
2227

2328
om_enable_rabbitmq_high_availability: true
2429

0 commit comments

Comments
 (0)