mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
ansible_freeipa_module: Import and provide normalize_sshpubkey
normalize_sshpubkey is imported from ipalib.util and also added to __all__ for use in modules.
This commit is contained in:
@@ -31,7 +31,7 @@ __all__ = ["gssapi", "netaddr", "api", "ipalib_errors", "Env",
|
|||||||
"paths", "tasks", "get_credentials_if_valid", "Encoding",
|
"paths", "tasks", "get_credentials_if_valid", "Encoding",
|
||||||
"DNSName", "getargspec", "certificate_loader",
|
"DNSName", "getargspec", "certificate_loader",
|
||||||
"write_certificate_list", "boolean", "template_str",
|
"write_certificate_list", "boolean", "template_str",
|
||||||
"urlparse"]
|
"urlparse", "normalize_sshpubkey"]
|
||||||
|
|
||||||
import os
|
import os
|
||||||
# ansible-freeipa requires locale to be C, IPA requires utf-8.
|
# ansible-freeipa requires locale to be C, IPA requires utf-8.
|
||||||
@@ -157,6 +157,8 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||||
|
|
||||||
|
from ipalib.util import normalize_sshpubkey
|
||||||
|
|
||||||
except ImportError as _err:
|
except ImportError as _err:
|
||||||
ANSIBLE_FREEIPA_MODULE_IMPORT_ERROR = str(_err)
|
ANSIBLE_FREEIPA_MODULE_IMPORT_ERROR = str(_err)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user