Skip to content

Commit 426e4be

Browse files
authored
Merge pull request #593 from stackhpc/aio-os-release
Lookup os_release for appropriate distros in AIO and AUFN-Ceph
2 parents ea5ac06 + 9226959 commit 426e4be

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

etc/kayobe/environments/aufn-ceph/globals.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ os_distribution: "{{ lookup('pipe', '. /etc/os-release && echo $ID') | trim }}"
1010

1111
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
1212
# "focal" when os_distribution is "ubuntu".
13-
#os_release:
13+
os_release: >-
14+
{{ (lookup('pipe', '. /etc/os-release && echo $VERSION_CODENAME') | trim) if os_distribution == 'ubuntu' else
15+
(lookup('pipe', '. /etc/os-release && echo $VERSION_ID') | trim | split('.') | first) if os_distribution == 'rocky' else
16+
'stream-8' }}

etc/kayobe/environments/ci-aio/globals.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ os_distribution: "{{ lookup('pipe', '. /etc/os-release && echo $ID') | trim }}"
5151

5252
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
5353
# "focal" when os_distribution is "ubuntu".
54-
#os_release:
54+
os_release: >-
55+
{{ (lookup('pipe', '. /etc/os-release && echo $VERSION_CODENAME') | trim) if os_distribution == 'ubuntu' else
56+
(lookup('pipe', '. /etc/os-release && echo $VERSION_ID') | trim | split('.') | first) if os_distribution == 'rocky' else
57+
'stream-8' }}
5558
5659
###############################################################################
5760

0 commit comments

Comments
 (0)