Skip to content

Commit

Permalink
Define packages needed to run Obal on EL8/EL9 based on Ansible Python…
Browse files Browse the repository at this point in the history
… version
  • Loading branch information
ehelms authored and evgeni committed Sep 27, 2023
1 parent a7f60c1 commit 048323d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions puppet/modules/slave/manifests/packaging/rpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Optional[String] $koji_certificate = undef,
) {
$is_el7 = $facts['os']['release']['major'] == '7'
$ansible_python_version = if $facts['os']['release']['major'] == '8' { 'python3.11' } else { 'python3' }

package { ['koji', 'rpm-build', 'createrepo', 'copr-cli', 'rpmlint']:
ensure => installed,
Expand All @@ -29,8 +30,16 @@
}

# To run obal
$yaml = if $is_el7 { 'python36-PyYAML' } else { 'python3-pyyaml' }
ensure_packages(['python3', $yaml])
$obal_packages = if $is_el7 {
['python36-PyYAML']
} else {
[
$ansible_python_version,
"${ansible_python_version}-pyyaml",
"${ansible_python_version}-setuptools",
]
}
ensure_packages($obal_packages)

# koji
file { "${homedir}/bin":
Expand Down

0 comments on commit 048323d

Please sign in to comment.