Ver código fonte

Use six from ansible.module_utils for remote hosts

Jason DeTiberus 8 anos atrás
pai
commit
2e37c702c8

+ 1 - 1
filter_plugins/oo_filters.py

@@ -18,9 +18,9 @@ from collections import Mapping
 from distutils.util import strtobool
 from distutils.version import LooseVersion
 from operator import itemgetter
-from ansible.module_utils.six.moves.urllib.parse import urlparse
 from ansible.parsing.yaml.dumper import AnsibleDumper
 from six import string_types
+from six.moves.urllib.parse import urlparse
 
 HAS_OPENSSL = False
 try:

+ 1 - 1
roles/openshift_certificate_expiry/library/openshift_cert_expiry.py

@@ -10,7 +10,7 @@ import os
 import subprocess
 import yaml
 
-from six.moves import configparser
+from ansible.module_utils.six.moves import configparser
 
 from ansible.module_utils.basic import AnsibleModule
 

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

@@ -19,8 +19,8 @@ import struct
 import socket
 from distutils.util import strtobool
 from distutils.version import LooseVersion
-from six import string_types, text_type
-from six.moves import configparser
+from ansible.module_utils.six import string_types, text_type
+from ansible.module_utils.six.moves import configparser
 
 # ignore pylint errors related to the module_utils import
 # pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import

+ 0 - 1
roles/openshift_facts/vars/main.yml

@@ -2,7 +2,6 @@
 required_packages:
   - iproute
   - python-dbus
-  - python-six
   - PyYAML
   - yum-utils
 

+ 2 - 3
roles/openshift_health_checker/openshift_checks/__init__.py

@@ -7,8 +7,7 @@ from abc import ABCMeta, abstractmethod, abstractproperty
 from importlib import import_module
 import operator
 
-import six
-from six.moves import reduce
+from ansible.module_utils.six.moves import add_metaclass, reduce
 
 
 class OpenShiftCheckException(Exception):
@@ -16,7 +15,7 @@ class OpenShiftCheckException(Exception):
     pass
 
 
-@six.add_metaclass(ABCMeta)
+@add_metaclass(ABCMeta)
 class OpenShiftCheck(object):
     """A base class for defining checks for an OpenShift cluster environment."""