Skip to content

Commit 3e1ffcc

Browse files
committed
CI: Set os_release from host operating system
This will be used for testing centos/rocky 9 and 10 on the same branch. Also explain why these variables are not simplified using Ansible facts. Change-Id: Ida19ee1123a59d19aa2bc7abae3cf5d1ea1c985c Signed-off-by: Pierre Riteau <pierre@stackhpc.com>
1 parent faa8fcc commit 3e1ffcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

etc/kayobe/globals.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@
4646

4747
# OS distribution name. Valid options are "centos", "rocky", "ubuntu". Default
4848
# is "rocky".
49+
# NOTE: Avoids using Ansible facts to be compatible with gather_facts: false
4950
os_distribution: "{{ lookup('pipe', '. /etc/os-release && echo $ID') | trim }}"
5051

5152
# OS release. Valid options are "9-stream" when os_distribution is "centos", or
5253
# "9" when os_distribution is "rocky", or "noble" when os_distribution is
5354
# "ubuntu".
54-
#os_release:
55+
# NOTE: Avoids using Ansible facts to be compatible with gather_facts: false
56+
# yamllint disable-line rule:line-length
57+
os_release: "{{ 'noble' if os_distribution == 'ubuntu' else lookup('pipe', '. /etc/os-release && echo $VERSION_ID | cut -d . -f 1') | trim }}{{ '-stream' if os_distribution == 'centos' else '' }}"
5558

5659
###############################################################################
5760
# Ansible configuration.

0 commit comments

Comments
 (0)