X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=packer%2Fprovision%2Fdocker.sh;h=12814a6f213bccc1304aa95c1c227d6457b78a7b;hb=4f39afa724d84b0d4f31888eb241d7d7b60ea509;hp=23b1fc042c0a9e78e8c9bfd346afe8f5bd0df2b8;hpb=3639617a6eeee54106ab6dc427e425f96b15d9ca;p=releng%2Fbuilder.git diff --git a/packer/provision/docker.sh b/packer/provision/docker.sh index 23b1fc042..12814a6f2 100644 --- a/packer/provision/docker.sh +++ b/packer/provision/docker.sh @@ -2,6 +2,9 @@ # vim: sw=4 ts=4 sts=4 et : +# force any errors to cause the script and job to end in failure +set -xeu -o pipefail + rh_changes() { echo "---> RH changes" # install docker and enable it @@ -21,18 +24,21 @@ EOL # docker group doesn't get created by default for some reason groupadd docker + + # Install python dependencies + yum install -y python-{devel,virtualenv,setuptools,pip} } ubuntu_changes() { echo "---> Ubuntu changes" } -OS=$(/usr/bin/facter operatingsystem) +OS=$(/usr/bin/facter operatingsystem | tr '[:upper:]' '[:lower:]') case "$OS" in - CentOS|Fedora|RedHat) + centos|fedora|redhat) rh_changes ;; - Ubuntu) + ubuntu) ubuntu_changes ;; *)