Browse Source

Merge pull request #7055 from fabianvf/bz1541625

Bug 1541625- properly cast provided ip address to unicode
Scott Dodson 7 years ago
parent
commit
f0f1188f62
1 changed files with 2 additions and 2 deletions
  1. 2 2
      roles/openshift_facts/library/openshift_facts.py

+ 2 - 2
roles/openshift_facts/library/openshift_facts.py

@@ -18,7 +18,7 @@ import socket
 import ipaddress
 from distutils.util import strtobool
 from distutils.version import LooseVersion
-from ansible.module_utils.six import u
+from ansible.module_utils.six import text_type
 from ansible.module_utils.six import string_types
 from ansible.module_utils.six.moves import configparser
 
@@ -1153,7 +1153,7 @@ def set_proxy_facts(facts):
                 if 'no_proxy_internal_hostnames' in common:
                     common['no_proxy'].extend(common['no_proxy_internal_hostnames'].split(','))
             # We always add local dns domain and ourselves no matter what
-            kube_svc_ip = str(ipaddress.ip_network(u(common['portal_net']))[1])
+            kube_svc_ip = str(ipaddress.ip_network(text_type(common['portal_net']))[1])
             common['no_proxy'].append(kube_svc_ip)
             common['no_proxy'].append('.' + common['dns_domain'])
             common['no_proxy'].append('.svc')