- name: disable instance on HAproxy and wait for it to go offline
haproxy: state=disabled backend=app_back host={{ inventory_hostname_short
}} socket=/run/haproxy/admin.sock shutdown_sessions=no wait=yes
delegate_to: "{{ item }}"
with_items: groups.haproxy_app
The haproxy_app group has 3 instances (hap01 ... hap03), and the main
playbook is executed on 10 instances, and it's sequential, app01 to app10.
Let's say the main playbook is now executed on app01, and it hits the
haproxy task. Is the haproxy task going to be delegated to all haproxy
instances at once, in parallel (from the p.o.v. of app01), or is it going
to be executed sequentially, hap01, then hap02, then hap03?
Again, I am talking from the p.o.v. of each app instance where the main
playbook is being executed.
The reason why I'm asking: This is the task which disables an app instance
in HAproxy, and I would like each app to be disabled more or less at once
on all proxies (in parallel). I want to avoid, as much as possible, the
slower sequential process where an app instance is disabled on each proxy
sequentially, one by one.
--
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/cfb6b8e4-95b0-46a2-a06f-6e4266e7b66f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.