diff options
| author | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-08-30 13:09:56 -0600 |
|---|---|---|
| committer | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-08-30 13:09:56 -0600 |
| commit | 649f0dd9c5ca586d8b637400dd19c0c4059447d6 (patch) | |
| tree | 5ccc992a3aa5de1bcb510911dfdb21e6a54bd197 /salt/openbook/ci/files/cloudcfg.sh | |
initial commit
Diffstat (limited to 'salt/openbook/ci/files/cloudcfg.sh')
| -rw-r--r-- | salt/openbook/ci/files/cloudcfg.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/salt/openbook/ci/files/cloudcfg.sh b/salt/openbook/ci/files/cloudcfg.sh new file mode 100644 index 0000000..f7dffd6 --- /dev/null +++ b/salt/openbook/ci/files/cloudcfg.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Prepare the instance for ansible. This amounts to installing python2. + +python=$(which python || which python3 || which python2 || false) + +case "$(${python} -m platform)" in + *Ubuntu*) + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade + apt-get -y install python python2.7 + ;; + *centos*|*redhat*) + # RHEL systems still use python2 by default; nothing to do + ;; + *gentoo*) + if [ ! -d /usr/portage/sys-devel/gcc ]; then + emerge-webrsync + fi + emerge --oneshot --update dev-lang/python:2.7 app-portage/gentoolkit + ;; +esac + +exit 0 |
