Skip to content

Commit 899bdf3

Browse files
committed
Automate Kolla Ansible tag variable definitions
1 parent 8d80e03 commit 899bdf3

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

etc/kayobe/kolla-image-tags.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
ovn:
10+
rocky: zed-rocky-9-20230925T132313
11+
ubuntu: zed-ubuntu-jammy-20230821T155947

etc/kayobe/kolla/globals.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +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-
ovn:
18-
rocky: zed-rocky-9-20230925T132313
19-
ubuntu: zed-ubuntu-jammy-20230821T155947
20-
21-
openstack_tag: "{% raw %}{{ kayobe_image_tags['openstack'][kolla_base_distro] }}{% endraw %}"
22-
ovn_tag: "{% raw %}{{ kayobe_image_tags['ovn'][kolla_base_distro] }}{% 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(width=4, first=true) }}
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 %}
2327

2428
om_enable_rabbitmq_high_availability: true
2529

0 commit comments

Comments
 (0)