Created
April 7, 2014 06:29
-
-
Save ijokarumawak/10015624 to your computer and use it in GitHub Desktop.
Setup Ansible control server using Vagrant
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
#!/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 | |
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
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