From 4243ce61b3bc99c7617a66341cf837cad955c2fa Mon Sep 17 00:00:00 2001 From: hoettle Date: Tue, 25 Feb 2014 23:11:05 +1100 Subject: [PATCH] Correct placement of right parenthesis. (serial_pct)/100.0 is a typo - the parentheses should be around the entire percentage calculation, which makes much more sense when multiplying by the number of hosts (luckily BODMAS prevailed). --- lib/ansible/playbook/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index f037315e89b..bf3961d2991 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -642,7 +642,7 @@ class PlayBook(object): # This is a percentage, so calculate it based on the # number of hosts serial_pct = int(play.serial.replace("%","")) - serial = int((serial_pct)/100.0 * len(all_hosts)) + serial = int((serial_pct/100.0) * len(all_hosts)) # Ensure that no matter how small the percentage, serial # can never fall below 1, so that things actually happen