diff --git a/lib/beaker/host/unix/pkg.rb b/lib/beaker/host/unix/pkg.rb index fd5ffbf45..3b10728f9 100644 --- a/lib/beaker/host/unix/pkg.rb +++ b/lib/beaker/host/unix/pkg.rb @@ -85,7 +85,7 @@ def install_package(name, cmdline_args = '', version = nil, opts = {}) when /amazon-2023|el-(8|9|1[0-9])|fedora/ name = "#{name}-#{version}" if version execute("dnf -y #{cmdline_args} install #{name}", opts) - when /centos|redhat|el-[1-7]-/ + when /amazon-7|centos|redhat|el-[1-7]-/ name = "#{name}-#{version}" if version execute("yum -y #{cmdline_args} install #{name}", opts) when /ubuntu|debian/ @@ -167,7 +167,7 @@ def uninstall_package(name, cmdline_args = '', opts = {}) execute("zypper --non-interactive rm #{name}", opts) when /amazon-2023|el-(8|9|1[0-9])|fedora/ execute("dnf -y #{cmdline_args} remove #{name}", opts) - when /centos|redhat|el-[1-7]-/ + when /amazon-7|centos|redhat|el-[1-7]-/ execute("yum -y #{cmdline_args} remove #{name}", opts) when /ubuntu|debian/ execute("apt-get purge #{cmdline_args} -y #{name}", opts)