Created
July 11, 2016 02:24
-
-
Save brennanfee/f940bad3aea7ce2ca99310676205d693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ubuntu-install-ansible.sh - Tiny script to do the minimal installation | |
# required to get a pip installed Ansible. | |
# | |
# Bash "strict" mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Update | |
echo "Updating Apt Cache" | |
apt-get update | |
# Install Python | |
apt-get install -y python-dev python3-dev libkrb5-dev libssl-dev libffi-dev | |
# Download pip install script | |
curl -fsSL https://bootstrap.pypa.io/get-pip.py -o "/tmp/get-pip.py" | |
# Install Pip3 | |
if [[ ! -x "/usr/local/bin/pip3" ]]; then | |
python3 /tmp/get-pip.py | |
fi | |
# Install Pip2 | |
if [[ ! -x "/usr/local/bin/pip2" ]]; then | |
python2 /tmp/get-pip.py | |
fi | |
# Install Ansible | |
/usr/local/bin/pip2 install ansible kerberos pywinrm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment