ansible/ansible — pull request #2464 by leucos (2013-03-20 09:50:41+00:00)
Title: ansible-pull "bootstrapping" improvements

ansible-pull currently requires several things to be functional :
- 127.0.0.1 must be in default (`/etc/ansible/hosts`) inventory file (for the `ansible` step)
- `/etc/ansible/host` must match the playbook pulled if we want to use the real node hostname instead of 127.0.0.1 (and thus, use a "real life" playbook, pulled by different nodes) in the `ansible-playbook` step

This patch should solve this and allow :
- additional step towards zero conf ansible-pull bootstrapping : set hostname (and add in `/etc/hosts`), install ansible, kick `ansible-pull`, you should be set)
- no need to configure `/etc/ansible/hosts` for the `ansible` step
- use of real inventory file (only file is supported, as previously) so shared playbooks will have proper variables for the current host, use host_vars/group_vars properly, etc...

This promotes reuse since it allows easy deploying a fleet of machines, hidden behind firewalls/NAT gateways, using a single playbook.

_Caveat_: 127.0.0.1 is now in `/etc/ansible/hosts`. How this could lead to local deployment mayhem with fresh installs (e.g. new user running a random downloaded playbook with -l localhost) might have to be considered.