From 64636d9de0b7d2bbddb30bc3e21070db64d67202 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 --- 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 59d9376712c..0c0a89cbf0e 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 '''