Hello Group,

I'm looking for a way to access facts for my hostnames through the hostvars 
and groups methods. This all works well, but I'm stuck when I try to limit 
the batch size with the "serial" directive.

For example: I have 10 web servers that I want to do rolling update using 
the "serial: 50%".

{% for host in groups['app_servers'] %}
   {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}


Using the above example will give me all hosts in the group "app_servers" 
and there is no way to get only 50% of the hosts.

Is there a way to get facts information for "all hosts in the scope" and 
"all hosts outside of scope"?

-- 
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/a34343e2-3266-49bb-a483-e894350d25fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to