Ansible is a configuration management tool which works on "push" mechanism. It means there is no need of agent to get installed in nodes/machines as it is done when puppet/chef is used. Ansible maintains hosts file in server entries are made either using machine name or ip addresses.
It is very useful when large number of machines/servers need to be configured in the network with the similar configuration. Ansible runs at the controller node and it just needs ssh connection to the target machine to perform defined tasks in Ansible playbook if you are using else you can use Ansible ad-hoc commands to perform different set of actions or to fetch the details of the server.
To automate the things you have to make password less ssh connection between Ansible machine i.e controller node and another machine. You have already answered my query two days back to make password less ssh.
Reference:
http://tech.queryhome.com/151507/how-i-can-make-ssh-to-other-machine-password-less