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 '''