Skip to content

Commit

Permalink
[PE-37297]: Added support for amazon 2023 in redhat.pp manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
span786 committed Dec 19, 2023
1 parent 1b436d8 commit 83d9680
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/acceptance/junit
/acceptance/log
14 changes: 11 additions & 3 deletions manifests/osfamily/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@
$platform_and_version = "fedora/${facts['os']['release']['major']}"
}
'Amazon': {
if ("${facts['os']['release']['major']}" == '2') {
$major_version = $facts['os']['release']['major']
if ("${major_version}" == '2') {
$amz_el_version = '7'
} else {
}
else {
$amz_el_version = '6'
}
$platform_and_version = "el/${amz_el_version}"

if ("${amz_el_version}" =~ /^(\A6\z|\A7\z)/) {
$platform_and_version = "el/${amz_el_version}"
}
else {
$platform_and_version = "amazon/${major_version}"
}
}
default: {
$platform_and_version = "el/${facts['os']['release']['major']}"
Expand Down

0 comments on commit 83d9680

Please sign in to comment.