>
> let me elaborate a bit further:
>

The backend groups have a variable set for the webservice to call, that 
webservice runs on one of the frontend boxes.

[backend:children]
backend-group1
backend-group2

[backend-group1]
be[1:3]

[frontend-group1]
fe1

[backend-group2]
be[4:6]

[frontend-group2]
fe2

The play runs on "backend", copies the files to each member of the backend 
groups and as the last step calls the 'webservice' defined for that group.
However it will do so three times per group (once for each host). 
When you use 'run_once' it will run it only once, which will work if you 
run the play for a single group, however when you run the play against all 
groups at once, it will only call the webservice once, but in the above 
setup it should have called two different webservices (backend-group2 has 
frontend-group2 defined and backend-group1 has frontend-group1 defined 
after all).

Splitting it out in a separate play and running it against 'frontend' 
directly doesn't work since at that point I don't know anymore which 
backend servers where touched (let's say I've used --limit backend-group1 
and the second play is defined to run on 'frontend'. The only way this can 
work is if I would explicitly use --limit backend-group1,frontend-group1, 
but that kinda defeats the purpose of what I'm doing here).

The nicest solution I see would be having something like 
'run_once_per_group'. 
 



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/436bc3ed-736a-48b7-9291-de40c79ecad4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to