also sprach Michael DeHaan <michael@ansibleworks.com> [2013.06.20.2239 +0200]:
I think the fundamental misunderstanding here is folks are coming
in from tools like Puppet and not looking at the general process
orchestration or app deployment use cases.
Well, not all users of Ansible need process orchestration or app
deployment. Our nodes are all independent of each other.
You don't just have to have the one site.yml that is like
a site.pp (in which case I can see the idea of being able to
assign roles from inventory), but rather as many as you want.
Yes, this is indeed very nice, to be able to play just one book at
a time.
However, if you want to manage systems, you will want to have
Ansible run regularly, to ensure that local changes that are not
in-line with your infrastructure definition (inventory, whatever),
get reverted.
And at this point you need site.yml or master.yml.
I also understand your point about playbooks targetting groups of
hosts. But what about the case when a group already corresponds to
a role?
The reason being, suppose you included a role for every machine in
'webservers' and wanted to auto build the play.
However, some webservers are in Boston and some are in DC. The
Boston webservers need an additional role named 'Boston', and some
in 'DC' need the DC role.
Yes, of course. Those additional roles get applied too. After the
'webserver' role was applied to all 'webserver_hosts', the 'Boston'
role gets applied to all nodes in the group 'hosted@boston_hosts'
(our naming convention).
You can either manage this with group_vars, as you suggest, or with
groups, which is what we do. I.e. there is a group for every role
already present.
Thus the play is THE place where you define that.
I view the idea that you want to externalize that outside the
playbook as an unneccessary abstraction, because the play IS the
place where you define it.
… unless you already have the information elsewhere.
Am I reading you right that you won't consider this use case, that
you suggest I auto-generate playbooks on my end to cater for my
needs, but that you won't consider whatever I come up with for core
inclusion?
Cheers,