diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 3e22a8e03f..fd09f6fde1 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -512,7 +512,7 @@ openstack_release: "train" # Docker image tag used by default. openstack_tag: "{{ openstack_release ~ openstack_tag_suffix }}" # TODO(mgoddard): Set to an empty string when CentOS 7 is no longer supported. -openstack_tag_suffix: "{{ '' if kolla_base_distro != 'centos' or ansible_distribution_major_version == '7' else '-centos8' }}" +openstack_tag_suffix: "{{ '' if kolla_base_distro != 'centos' or ansible_distribution_major_version == '7' else '-centos8s' if 'Stream' in (kolla_centos_release['content'] | default() | b64decode ) else '-centos8' }}" openstack_logging_debug: "False" openstack_region_name: "RegionOne" diff --git a/ansible/site.yml b/ansible/site.yml index ffd32c3701..5f67ec02e3 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -12,6 +12,10 @@ group_by: key: "openstack_release_{{ openstack_release }}" + - name: Group hosts based on OS distribution + group_by: + key: "kolla_distribution_{{ ansible_facts['distribution'] }}" + - name: Group hosts based on Kolla action group_by: key: "kolla_action_{{ kolla_action }}" @@ -92,6 +96,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'. diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst index 7f3d63e48e..eedcfb9141 100644 --- a/doc/source/user/quickstart.rst +++ b/doc/source/user/quickstart.rst @@ -401,6 +401,16 @@ There are a few options that are required to deploy Kolla-Ansible: kolla_base_distro: "centos" + You can also use CentOS Stream 8 - it's recommended for new installations + because CentOS Linux 8 was supported only until `31st Dec 2021 `__. + + 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: "" + Next "type" of installation needs to be configured. Choices are: diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 15dbac66fc..271f18caa8 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -24,7 +24,7 @@ #openstack_tag: "{{ openstack_release ~ openstack_tag_suffix }}" # Suffix applied to openstack_release to generate openstack_tag. -#openstack_tag_suffix: "{{ '' if base_distro != 'centos' or ansible_distribution_major_version == '7' else '-centos8' }}" +#openstack_tag_suffix: "{{ '' if kolla_base_distro != 'centos' or ansible_distribution_major_version == '7' else '-centos8s' if 'Stream' in (kolla_centos_release['content'] | default() | b64decode ) else 'centos8s' }}" # Location of configuration overrides #node_custom_config: "/etc/kolla/config" diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 988da9a69d..118c9f7339 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -23,6 +23,10 @@ docker_custom_config: - {{ infra_dockerhub_mirror }} {% endif %} +{% if kolla_python_version is defined and not is_previous_release %} +distro_python_version: "{{ kolla_python_version }}" +{% 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) }}"