Skip to content

Commit

Permalink
support rpm platforms with dnf only
Browse files Browse the repository at this point in the history
observed the latest rockylinux 9 containers do not have a yum symlink
to dnf anymore.
  • Loading branch information
h0tw1r3 committed May 13, 2024
1 parent 34d623a commit 0a246a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/install_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,11 @@ install_file() {
fi

rpm -Uvh --oldpackage --replacepkgs "$2"
exists dnf && PKGCMD=dnf || PKGCMD=yum
if test "$version" = 'latest'; then
run_cmd "yum install -y puppet-agent && yum upgrade -y puppet-agent"
run_cmd "${PKGCMD} install -y puppet-agent && ${PKGCMD} upgrade -y puppet-agent"
else
run_cmd "yum install -y 'puppet-agent-${puppet_agent_version}'"
run_cmd "${PKGCMD} install -y 'puppet-agent-${puppet_agent_version}'"
fi
;;
"noarch.rpm")
Expand Down

0 comments on commit 0a246a5

Please sign in to comment.