Ansible provides support for managing multiple servers and getting them to a desired state. For packaging OHIE purpose ansible is used as a user management service. Ansible connects using SSH and needs an environment setup.
Create a clean environment for your ansible setup
vagrant init ubuntu/trusty64 vagrant up && vagrant ssh
Create an ssh key for that instance
cd ~/.ssh ssh-keygen -t rsa -b 4096 -C "maurya@openmrs.org" -f id_rsa
Copy the public key to be used for root user while creating a virtual box for ansible to do it's magic. The following is for copying the content into a mac clipboard. (You can still use cat to see the content and copy it over)
cat id_ansible.pub | pbcopy
Add ansible ppa and update cache and install ansible on that machine
sudo add-apt-repository ppa:ansible/ansible sudo apt-get update sudo apt-get install -y ansible
Configure ansible hosts file and add your hosts/servers you would like to manage using ansible to this file
sudo mv /etc/ansible/hosts /etc/ansible/hosts.bak sudo vim /etc/ansible/hosts
Example:
[test] xx.xx.xxx.xxx [production] example.hello.com
Setting up Git
sudo apt-get install git git config --global user.email "youremailid" git config --global user.name "youreusername" git config --global core.editor "vim" git config --global push.default simple git --version