ansible/ansible — pull request #5072 by hoettle (2013-11-27 11:49:57+00:00)
Title: playbook: permit the serial attribute to be a percentage string

Rolling updates with Ansible can suffer from unexpected side effects if the serial attribute is greater than the number of hosts, e.g. a generic deployment playbook used for differently-sized environments. Serial can now be specified as "x%", in which case 'x' will be used to calculate the actual number of hosts (which can never be < 1) for each pass, rounded down.

e.g.

10 hosts
serial: 30%

pass 1:
host01-03

pass 2:
host04-06

pass 3:
host07-09

pass 4:
host10

This PR was spawned from https://groups.google.com/d/topic/ansible-project/2T7kqVz5wzg/discussion