...
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
Code Block language bash linenumbers true vagrant init ubuntu/trusty64 vagrant up && vagrant ssh
Create an ssh key for that instance
Code Block language bash linenumbers true 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)
Code Block language bash linenumbers true cat id_ansible.pub | pbcopy
Add ansible ppa and update cache and install ansible on that machine
Code Block language bash linenumbers true sudo add-apt-repository ppa:ansible/ansible sudo apt-get update sudo apt-get install -y ansible
Configure ansible hosts file
Code Block language bash linenumbers true sudo mv /etc/ansible/hosts /etc/ansible/hosts.bak sudo vim /etc/ansible/hosts