A Python agent for provisioning and deprovisioning Bare Metal servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
846 B

#!/bin/bash
if ! $(pip -V &>/dev/null); then
echo "Warning: Please install python-pip manually"
exit 1
fi
COMMON_PACKAGES="wget unzip sudo gawk"
APT_PACKAGES="${COMMON_PACKAGES} squashfs-tools"
YUM_PACKAGES="${COMMON_PACKAGES} squashfs-tools"
ZYPPER_PACKAGES="${COMMON_PACKAGES} squashfs"
echo "Installing dependencies:"
# first zypper in case zypper-aptitude is installed
if [ -x "/usr/bin/zypper" ]; then
sudo -E zypper -n install -l ${ZYPPER_PACKAGES}
elif [ -x "/usr/bin/apt-get" ]; then
sudo -E apt-get update
sudo -E apt-get install -y ${APT_PACKAGES}
elif [ -x "/usr/bin/dnf" ]; then
sudo -E dnf install -y ${YUM_PACKAGES}
elif [ -x "/usr/bin/yum" ]; then
sudo -E yum install -y ${YUM_PACKAGES}
else
echo "No supported package manager installed on system. Supported: apt, yum, dnf, zypper"
exit 1
fi