Adding servers to ansible

So i am playing around with ansible these days. Only to find out that every server needs some manual work in order to work with ansible. So why not “ansible” that too? I’ve created a simple function in bash that lets me do “addserver <ipaddress>” and then it does all the default stuff for me. To check it out, just look at my gist entry on github.

Once that is done, then you run a proper playbook against it (to disable remote ssh for root) and all your other stuff 🙂

Update: added !requiretty so you can add pipelining=True in your ansible.cfg for faster running of your playbooks.