summaryrefslogtreecommitdiff
path: root/lib/ansible/compat
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2016-12-28 08:16:02 -0600
committerJames Cammarata <jimi@sngx.net>2017-01-03 14:32:44 -0600
commitfed079e4cb45af397c8f0b244490b2af0e0d0f38 (patch)
treea7247552dd93b105f430e08538f4e9728d77d065 /lib/ansible/compat
parent9f2d22425bd15ff8bade5ae12c00679ff2b3b81d (diff)
downloadansible-fed079e4cb45af397c8f0b244490b2af0e0d0f38.tar.gz
Fix role completion detection problem
When the same role is listed consecutively in a play, the previous role completion detection failed to mark it as complete as it only checked to see if the role changed. This patch addresses that by also keeping track of which task in the role we are on, so that even if the same role is encountered during later passes the task number will be less than or equal to the last noted task position. Related to #15409
Diffstat (limited to 'lib/ansible/compat')
-rw-r--r--lib/ansible/compat/six/_six.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/compat/six/_six.py b/lib/ansible/compat/six/_six.py
index 190c0239cd..8caf2ad85c 100644
--- a/lib/ansible/compat/six/_six.py
+++ b/lib/ansible/compat/six/_six.py
@@ -43,6 +43,7 @@ if PY3:
class_types = type,
text_type = str
binary_type = bytes
+ cmp = lambda a, b: (a > b) - (a < b)
MAXSIZE = sys.maxsize
else:
@@ -51,6 +52,7 @@ else:
class_types = (type, types.ClassType)
text_type = unicode
binary_type = str
+ cmp = cmp
if sys.platform.startswith("java"):
# Jython always uses 32 bits.