CentOS Stream: Use a variable for openstack_tag_suffix

Change-Id: I8d03aca8826ddecbb609e6657eb45e0c2cb14133
This commit is contained in:
Michał Nasiadka 2021-09-01 15:33:15 +02:00 committed by Michal Nasiadka
parent 82a2d4a96d
commit c7d77ff7a6
6 changed files with 21 additions and 27 deletions

View File

@ -538,7 +538,7 @@ admin_protocol: "{{ 'https' if kolla_enable_tls_internal | bool else 'http' }}"
openstack_release: "victoria"
# Docker image tag used by default.
openstack_tag: "{{ openstack_release ~ openstack_tag_suffix }}"
openstack_tag_suffix: ""
openstack_tag_suffix: "{{ '-centos8s' if 'Stream' in (kolla_centos_release['content'] | default() | b64decode ) else '' }}"
openstack_logging_debug: "False"
openstack_region_name: "RegionOne"

View File

@ -8,6 +8,11 @@
hosts: all
gather_facts: false
tasks:
- name: Group hosts based on OS distribution
group_by:
key: "kolla_distribution_{{ ansible_facts['distribution'] }}"
changed_when: false
- name: Group hosts based on Kolla action
group_by:
key: "kolla_action_{{ kolla_action }}"
@ -86,6 +91,16 @@
- enable_zun_{{ enable_zun | bool }}
tags: always
- name: Check CentOS variant
gather_facts: false
# Apply only on CentOS hosts
hosts: kolla_distribution_CentOS
tasks:
- name: Slurp /etc/centos-release
slurp:
src: /etc/centos-release
register: kolla_centos_release
- name: Apply role prechecks
gather_facts: false
# Apply only when kolla action is 'precheck'.

View File

@ -378,9 +378,12 @@ There are a few options that are required to deploy Kolla-Ansible:
You can also use CentOS Stream 8 - it's recommended for new installations
because CentOS Linux 8 will be supported only until `31st Dec 2021 <https://wiki.centos.org/About/Product>`__.
By default Kolla-Ansible will use ``-centos8s`` ``openstack_tag_suffix`` on CentOS Stream 8 hosts,
to override that behaviour please set ``openstack_tag_suffix`` to an empty/different value.
.. code-block:: yaml
openstack_tag_suffix: "-centos8s"
openstack_tag_suffix: ""
Next "type" of installation needs to be configured.
Choices are:

View File

@ -40,7 +40,7 @@
#openstack_tag: "{{ openstack_release ~ openstack_tag_suffix }}"
# Suffix applied to openstack_release to generate openstack_tag.
#openstack_tag_suffix: ""
#openstack_tag_suffix: "{{ '-centos8s' if 'Stream' in (kolla_centos_release['content'] | default() | b64decode ) else '' }}"
# Location of configuration overrides
#node_custom_config: "/etc/kolla/config"

View File

@ -19,10 +19,6 @@ docker_custom_config:
distro_python_version: "{{ kolla_python_version }}"
{% endif %}
{% if base_tag_suffix is defined and not is_upgrade %}
openstack_tag_suffix: "{{ base_tag_suffix }}"
{% endif %}
# Use a random router id, otherwise it may result in the same router id
# in the CI gate.
keepalived_virtual_router_id: "{{ 250 | random(1) }}"

View File

@ -14,7 +14,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
tls_enabled: true
@ -60,7 +59,6 @@
nodeset: kolla-ansible-centos8s-nested-virt
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -85,7 +83,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -112,7 +109,6 @@
voting: false
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: binary
- job:
@ -140,7 +136,6 @@
timeout: 9000
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -166,7 +161,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -194,7 +188,6 @@
timeout: 9000
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
is_upgrade: yes
@ -241,7 +234,6 @@
timeout: 9000
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
is_upgrade: yes
@ -268,7 +260,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
- job:
name: kolla-ansible-centos8-source-zun
@ -284,7 +275,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -309,7 +299,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -334,7 +323,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -351,7 +339,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -368,7 +355,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: binary
- job:
@ -403,7 +389,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -436,7 +421,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -453,7 +437,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -478,7 +461,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -495,7 +477,6 @@
nodeset: kolla-ansible-centos8s-multi
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job:
@ -520,7 +501,6 @@
nodeset: kolla-ansible-centos8s
vars:
base_distro: centos
base_tag_suffix: "-centos8s"
install_type: source
- job: