Skip to content

Instantly share code, notes, and snippets.

@ijokarumawak
Created April 7, 2014 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijokarumawak/10015624 to your computer and use it in GitHub Desktop.
Save ijokarumawak/10015624 to your computer and use it in GitHub Desktop.
Setup Ansible control server using Vagrant
#!/bin/bash
su - vagrant
# Installing Ansible dependencies.
sudo apt-get update
sudo apt-get -y install git python-dev python-pip
sudo pip install paramiko PyYAML jinja2 httplib2
# Installing Ansible.
git clone git://github.com/ansible/ansible.git
cd ./ansible
source ./hacking/env-setup
echo '[local]
127.0.0.1 ansible_connection=local' > ~/ansible_hosts
export ANSIBLE_HOSTS=~/ansible_hosts
# Test Ansible availability.
ansible local -m ping
config.vm.provision "shell", path: "provision.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment