diff --git a/lib/ansible/modules/packaging/os/rhn_channel.py b/lib/ansible/modules/packaging/os/rhn_channel.py index 814a1b4c27..86aaa46a2b 100644 --- a/lib/ansible/modules/packaging/os/rhn_channel.py +++ b/lib/ansible/modules/packaging/os/rhn_channel.py @@ -64,9 +64,8 @@ EXAMPLES = ''' password: guessme ''' -import xmlrpclib -from operator import itemgetter -import re +from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.six.moves import xmlrpc_client # ------------------------------------------------------- # @@ -137,8 +136,8 @@ def main(): user = module.params['user'] password = module.params['password'] - #initialize connection - client = xmlrpclib.Server(saturl, verbose=0) + # initialize connection + client = xmlrpc_client(saturl) session = client.auth.login(user, password) # get systemid @@ -165,8 +164,5 @@ def main(): client.auth.logout(session) -# import module snippets -from ansible.module_utils.basic import * - if __name__ == '__main__': main() diff --git a/test/sanity/import/skip.txt b/test/sanity/import/skip.txt index f5a4ae42f9..99ec588cce 100644 --- a/test/sanity/import/skip.txt +++ b/test/sanity/import/skip.txt @@ -97,7 +97,6 @@ lib/ansible/modules/network/lenovo/cnos_vlag.py lib/ansible/modules/network/lenovo/cnos_vlan.py lib/ansible/modules/network/nxos/nxos_file_copy.py lib/ansible/modules/packaging/language/maven_artifact.py -lib/ansible/modules/packaging/os/rhn_channel.py lib/ansible/modules/storage/infinidat/infini_export.py lib/ansible/modules/storage/infinidat/infini_export_client.py lib/ansible/modules/storage/infinidat/infini_fs.py