-
Notifications
You must be signed in to change notification settings - Fork 16
Install
The instructions provided here is used to set up Ansible for managing other systems. A unique characteristic of Ansible is that is does not require a centralized management model. Although the instructions are general, the dependency names are specific to Debian based systems.
pip install --upgrade pip virtualenv virtualenvwrapper
virtualenv ansible2.1
source ansible2.1/bin/activate
pip install ansible==2.1
pip install redis
pip install --upgrade pip virtualenv virtualenvwrapper
virtualenv ansible2.0
source ansible2.0/bin/activate
pip install ansible==2.0.1.0
pip install redis
pip install --upgrade pip virtualenv virtualenvwrapper
virtualenv ansible1.9
source ansible1.9/bin/activate
pip install ansible==1.9.4
pip install redis
git clone git://github.com/ansible/ansible.git
Switch to version 1.9
git checkout stable-1.9
source ansible/hacking/env-setup
One could just simply brew install Ansible, but it does not always set up the system to run Ansible correctly. If while running Ansible an error is displayed regarding logs or permissions, run the following:
sudo mkdir -p /var/log/ansible
sudo touch /var/log/ansible/ansible.log
sudo chown -R ${USER}:wheel /var/log/ansible
sudo chmod 775 /var/log/ansible
sudo chmod 774 /var/log/ansible/ansible.log
wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
Then one might consider changing the following default parameters:
Update hostfile
hostfile = inventories/hosts
wget https://raw.githubusercontent.com/cyverse/ansible-tips-and-tricks/master/ansible.cfg
wget -O <path-to-ansible-dir>/ansible.cfg https://raw.githubusercontent.com/cyverse/ansible-tips-and-tricks/master/ansible.cfg
Simply install using apt then run Python VirtualEnv
sudo apt-get install ansible
Then follow the procedure in the first section of this document
Sometimes when attempting an initial Ansible ping, it can fail in a very confusing way. If this happens, try adding something like this to your ~/.ssh/config file:
Host <hostname-prefix>*
Port 22
User <ssh-login-username>
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null
Where anything between < > needs to be changed.