From 5b54472cfdd02f2a1ad6b3720287a013c248f84f Mon Sep 17 00:00:00 2001 From: Andrey Che Date: Wed, 5 Dec 2018 14:33:58 +0800 Subject: [PATCH] fix synchronize handling of encrypted hosts on delegation (#49460) * Fix for #49363 * Replaced str() with to_text() as more python version safe * Changed to comply to errors stragegy (cherry picked from commit 64636d9de0b7d2bbddb30bc3e21070db64d67202) --- lib/ansible/plugins/action/synchronize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 2bb5b7c7863..889579943d4 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -49,7 +49,7 @@ class ActionModule(ActionBase): return path def _host_is_ipv6_address(self, host): - return ':' in host + return ':' in to_text(host, errors='surrogate_or_strict') def _format_rsync_rsh_target(self, host, path, user): ''' formats rsync rsh target, escaping ipv6 addresses if needed '''