# Serial across groups

**URL:** <https://forum.ansible.com/t/serial-across-groups/18908>\
**Category:** Ansible Project\
**Created:** [July 31, 2015, 7:57am UTC](https://forum.ansible.com/t/serial-across-groups/18908 "2015-07-31T07:57:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Edmonds](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@David\_Edmonds](https://forum.ansible.com/u/David_Edmonds)\
**Post date:** [July 31, 2015, 7:57am UTC](https://forum.ansible.com/t/serial-across-groups/18908/1 "2015-07-31T07:57:56Z")

</div>

Hi,

I’m working on a deployment playbook at the moment, for an application made of multiple components running across multiple groups of servers. Most of the servers are load-balanced, so we would like to do rolling upgrades to these servers.

At present, we’ve set serial to 1. This means we remove each server from the load balancer, upgrade it, and put it back in to the load balancer. What we’d like to do is increase the number of servers operated on to one per group, as this would allow us to perform rolling upgrades when there are dependencies between the applications.

For example:

Given groups  
[web] =\> “web01”, “web02”  
[db] =\> “db01”, “db02”

We’d like to run:

- Remove “web01” and “db01” from load balancer
- Upgrade “web01” and “db01”
- Restore “web01” and “db01” to load balancer
- Remove “web02” and “db02” from load balancer
- Upgrade “web02” and “db02”
- Restore “web02” and “db02” to load balancer

Is there something that we can do to permit this in Ansible?

Many thanks,

David Edmonds

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 31, 2015, 1:21pm UTC](https://forum.ansible.com/t/serial-across-groups/18908/2 "2015-07-31T13:21:04Z")

</div>

Not tried myself but I think you can set serial to a percentage - there are a couple of examples here:  
[https://blog.serverdensity.com/what-ive-learnt-from-using-ansible-exclusively-for-2-years/](https://blog.serverdensity.com/what-ive-learnt-from-using-ansible-exclusively-for-2-years/)

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 31, 2015, 1:22pm UTC](https://forum.ansible.com/t/serial-across-groups/18908/3 "2015-07-31T13:22:01Z")

</div>

try:

hosts: \*01:\*02:\*03  
serial:2

---

<div class="post-metadata">

**Author:** ![David\_Edmonds](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@David\_Edmonds](https://forum.ansible.com/u/David_Edmonds)\
**Post date:** [August 6, 2015, 8:21am UTC](https://forum.ansible.com/t/serial-across-groups/18908/4 "2015-08-06T08:21:03Z")

</div>

Ah, nice! That certainly does the trick.

Thanks for your help.

David
