Files
dc-deployments-automation/bin/install-ansible
Ben Partridge d7fdb4c4c2 Suppress emoji and standard output when calling pipenv as it outputs
characters in non-ascii which causes errors in cloud-init
2019-11-28 15:29:44 +11:00

29 lines
539 B
Bash
Executable File

#!/bin/bash
set -e
source /etc/os-release
if [[ $ID = "amzn" ]]; then
yum install -y \
python3-devel \
python3-pip \
python2-boto3 \
python2-botocore
else
# FIXME: Currently assumes Debian-based
apt-get update && \
apt-get install -y \
python3-dev \
python3-pip
fi
export PATH=/usr/local/bin:$PATH
pip3 install pipenv
echo "Installing ansible and dependencies..."
PIPENV_HIDE_EMOJIS=1 pipenv sync >/dev/null
if [[ $1 == "--dev" ]]; then
pipenv sync --dev
fi