Skip to content

Instantly share code, notes, and snippets.

@jaimegago
Created June 17, 2014 19:14
Show Gist options
  • Save jaimegago/41da3eab091ab027c7bc to your computer and use it in GitHub Desktop.
Save jaimegago/41da3eab091ab027c7bc to your computer and use it in GitHub Desktop.
Ansible install from source on a debian/ubuntu box
#!/bin/bash
# bootstrap-ansible.sh: download and build Ansible on Debian host
# https://github.com/ginas/ginas/
set -e
# Create temporary directory for build
build_dir=$(mktemp -d)
trap "rm -rf ${build_dir}" EXIT
cd ${build_dir}
# Update APT package database
sudo apt-get update
# Install required packages
sudo apt-get --no-install-recommends -q -y install git \
python-paramiko python-yaml python-jinja2 python-httplib2 \
cdbs debhelper dpkg-dev python-support fakeroot sshpass \
python-nose python-passlib python-setuptools asciidoc xmlto
# Clone Ansible from main project repository (devel branch, default)
git clone git://github.com/ansible/ansible.git ansible
cd ansible
# Build Debian package
make deb
version=$(cat VERSION)
# Install Debian package
sudo dpkg -i ../ansible_${version}_all.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment