Merge "Add $YUM to pickup dnf on Fedora>=22"
This commit is contained in:
commit
d39b05bd97
@ -42,6 +42,13 @@ function is_opensuse {
|
|||||||
cat /etc/os-release | grep -q -e "openSUSE"
|
cat /etc/os-release | grep -q -e "openSUSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# dnf is a drop-in replacement for yum on Fedora>=22
|
||||||
|
YUM=yum
|
||||||
|
if is_fedora && [[ $(lsb_release -rs) -ge 22 ]]; then
|
||||||
|
YUM=dnf
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Distro specific puppet installs
|
# Distro specific puppet installs
|
||||||
#
|
#
|
||||||
@ -51,16 +58,17 @@ function _systemd_update {
|
|||||||
# services due to selinux errors after upgrade. A work-around is
|
# services due to selinux errors after upgrade. A work-around is
|
||||||
# to install the latest version of selinux and systemd here and
|
# to install the latest version of selinux and systemd here and
|
||||||
# restart the daemon for good measure after it is upgraded.
|
# restart the daemon for good measure after it is upgraded.
|
||||||
yum install -y selinux-policy
|
$YUM install -y selinux-policy
|
||||||
yum install -y systemd
|
$YUM install -y systemd
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_puppet_fedora {
|
function setup_puppet_fedora {
|
||||||
_systemd_update
|
_systemd_update
|
||||||
yum update -y
|
|
||||||
|
|
||||||
# NOTE: we preinstall lsb_release to ensure facter sets
|
$YUM update -y
|
||||||
|
|
||||||
|
# NOTE: we preinstall lsb_release here to ensure facter sets
|
||||||
# lsbdistcodename
|
# lsbdistcodename
|
||||||
#
|
#
|
||||||
# Fedora declares some global hardening flags, which distutils
|
# Fedora declares some global hardening flags, which distutils
|
||||||
@ -70,7 +78,7 @@ function setup_puppet_fedora {
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1217376) and can be
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1217376) and can be
|
||||||
# removed when that is sorted out.
|
# removed when that is sorted out.
|
||||||
|
|
||||||
yum install -y redhat-lsb-core git puppet \
|
$YUM install -y redhat-lsb-core git puppet \
|
||||||
redhat-rpm-config
|
redhat-rpm-config
|
||||||
|
|
||||||
mkdir -p /etc/puppet/modules/
|
mkdir -p /etc/puppet/modules/
|
||||||
|
Loading…
Reference in New Issue
Block a user