So as mentioned previously I have upgraded how inventory works today,
and as a result taught the INI format how to do
group variables and groups of groups -- this means that, as I wanted
to do, I don't have to rely on the YAML format for anything.
I have noticed that a fair number of people ARE using the YAML file,
so I don't see why we can't just keep this around for now, seeing the
work is done.
What this means for you...
Users:
* hopefully not much, but let us know if you see bugs
* INI, YAML, and external inventory are still working PER UNIT TESTS
(this does not mean there might not be bugs)
* groups of groups are supported in the INI format
* group variables are supported in the INI format
* see http://ansible.github.com/patterns.html for information on new usage
* testing welcome
Developers working on core code, not modules:
* look at inventory.py, group.py, host.py, and inventory_parser*.py to
see how they work
* check your scripts and make sure I didn't break any APIs you were
using. If I did, let me know, so I can fix them.
* there may be some bugs to ferret out involving the order at which
variables hash-merge in the groups tree, so feel free to patch things
if you find stuff.
Next steps:
* (for me) write some more test coverage for these features
* (for me) remove the code that reads ~/.ssh/config and replace it
with code that pays attention to inventory variables like:
ansible_ssh_port
ansible_alias
ansible_user
ansible_sudo
* document that these variables are magic
If people have site-wide configuration for SSH port and sudo mode, the
easiest thing for them to do is put this in their inventory file:
[all:vars]
ansible_user:timmy
ansible_sudo:root
ansible_ssh_port:2112
NOTE: right now the only variable that is magic is ansible_ssh_port.
The user obviously being something people may want to leave to just
-u, and not put a default in, if sharing a playbook with others.
I have promised folks task oriented more real-world docs about how to
do all of this, so once this is done I'm planning on rewriting the
playbook docs into a couple of different sections.
--Michael