From 92409cd6ee735596f1b522c99634cb4fd2d74648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 3 Sep 2014 15:41:02 +0200 Subject: [PATCH] Add a script to bootstrap Ansible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For deployments that are not on Vagrant, we need to install Ansible on the host. Signed-off-by: Sébastien Han --- bootstrap-ansible.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bootstrap-ansible.sh diff --git a/bootstrap-ansible.sh b/bootstrap-ansible.sh new file mode 100644 index 000000000..82f92bead --- /dev/null +++ b/bootstrap-ansible.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [[ $EUID -ne 0 ]]; then + echo "You are NOT running this script as root." + echo "You should." + echo "Really." + exit 1 +fi + +if [[ -x $(which lsb_release 2>/dev/null) ]]; then + os_VENDOR=$(lsb_release -i -s) + if [[ "Debian" =~ $os_VENDOR ]]; then + apt-get update + apt-get install python-pip python-dev git build-essential -y + pip install PyYAML jinja2 paramiko + git clone https://github.com/ansible/ansible.git + cd ansible + make install + mkdir /etc/ansible + elif [[ "Ubuntu" =~ $os_VENDOR ]]; then + apt-get install -y ansible +elif [[ -r /etc/redhat-release ]]; then + yum install -y ansible +fi +