From db2a99ba9d8d0d3c83abc45954afea4cdf1c76f4 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 19 Mar 2018 12:05:06 -0400 Subject: [PATCH] ensure we are checking text for text fixes #36962 --- lib/ansible/cli/pull.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/cli/pull.py b/lib/ansible/cli/pull.py index 1709da4ae82332..f57b5d0779627f 100644 --- a/lib/ansible/cli/pull.py +++ b/lib/ansible/cli/pull.py @@ -30,7 +30,7 @@ from ansible.cli import CLI from ansible.errors import AnsibleOptionsError -from ansible.module_utils._text import to_native +from ansible.module_utils._text import to_native, to_text from ansible.plugins.loader import module_loader from ansible.utils.cmd_functions import run_cmd @@ -245,7 +245,8 @@ def run(self): display.warning("Unable to update repository. Continuing with (forced) run of playbook.") else: return rc - elif self.options.ifchanged and '"changed": true' not in out: + # FIXME: this check is fragile, we should find better way to do change detection + elif self.options.ifchanged and '"changed": true' not in to_text(out): display.display("Repository has not changed, quitting.") return 0