Add the possibility to override the OS definition for enforcement.

There is an inline check for the Red Hat version of OpenStack that
ensure that the OS version matches the OpenStack version.

In the latest version of it we need to be able to temporarily change
the os version for some roles.

We implement this by defining a new role variable that will be
propagated to the ansible role responsible for the enforcement.

Note that when the rhsm_enforce_multios is defined, that create an
extra newline, but it doesn't break the resulting ansible playbook as
indentation is respected.

Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/891881
Change-Id: Ie9e789cb6367c7b1f96bf4f8a45aa08caa698fbc
This commit is contained in:
Sofer Athlan-Guyot 2023-07-10 17:51:08 +02:00
parent 13592e13ba
commit bfcca80ad3
2 changed files with 9 additions and 0 deletions

@ -987,6 +987,9 @@ outputs:
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tripleo_minor_update: true
tripleo_redhat_enforce: {{role.rhsm_enforce|default("true")}}
{% if role.rhsm_enforce_multios is defined %}
tripleo_redhat_enforce_multios: {{role.rhsm_enforce_multios}}
{% endif %}
tasks:
- import_tasks: hiera_steps_tasks.yaml
- import_tasks: common_container_config_scripts.yaml

@ -78,6 +78,12 @@ Role Options
check when it is not needed. Note that on non Red Hat environment
this switch has no effect.
* rhsm_enforce_multios: (string), optional, default to undefined, can be
set to "8.4" for instance. After a upgrade from 16.2 to 17.1 we can
be in a state where some compute roles are still on Red Hat 8.4. This
variable can be set to specify that value for those roles and
override the expected "9.2".
Working with Roles
==================
The tripleoclient provides a series of commands that can be used to view