charm-ceph-osd/hooks/install
Robert Gildein d0d3d3edf5 Add an action to provide information about AZ
The 'get-availability-zone' action will get information about an
availability zone that will contain information about the CRUSH
structure. Specifically 'rack' and 'row'.

Closes-Bug: #1911006
Change-Id: I99ebbef5f23d6efe3c848b089c7f2b0d26ad0077
2021-09-03 09:48:24 +02:00

22 lines
423 B
Bash
Executable File

#!/bin/bash -e
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
# by default.
declare -a DEPS=('apt' 'pip' 'yaml' 'tabulate')
check_and_install() {
pkg="${1}-${2}"
if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
apt-get -y install ${pkg}
fi
}
PYTHON="python3"
for dep in ${DEPS[@]}; do
check_and_install ${PYTHON} ${dep}
done
./hooks/install_deps
exec ./hooks/install.real