Skip to content
Snippets Groups Projects
Commit f33d234d authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ansible_ipa_server: Remove user_input, add missing DN and ntpinstance

Removed unused user_input import from ipapython.ipautil. Added import
of DN from ipapython.dn. Set ntpinstance to None if timeconf or
sync_time could not be imported on older FreeIPA releases.
parent b6a562b8
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ if NUM_VERSION >= 40500: ...@@ -59,7 +59,7 @@ if NUM_VERSION >= 40500:
if NUM_VERSION < 40600: if NUM_VERSION < 40600:
from ipapython.ipa_log_manager import root_logger from ipapython.ipa_log_manager import root_logger
from ipapython.ipautil import ( from ipapython.ipautil import (
ipa_generate_password, run, user_input) ipa_generate_password, run)
from ipapython.admintool import ScriptError from ipapython.admintool import ScriptError
from ipaplatform import services from ipaplatform import services
from ipaplatform.paths import paths from ipaplatform.paths import paths
...@@ -73,10 +73,12 @@ if NUM_VERSION >= 40500: ...@@ -73,10 +73,12 @@ if NUM_VERSION >= 40500:
no_matching_interface_for_ip_address_warning, no_matching_interface_for_ip_address_warning,
) )
from ipapython.dnsutil import check_zone_overlap from ipapython.dnsutil import check_zone_overlap
from ipapython.dn import DN
try: try:
from ipaclient.install import timeconf from ipaclient.install import timeconf
from ipaclient.install.client import sync_time from ipaclient.install.client import sync_time
time_service = "chronyd" time_service = "chronyd"
ntpinstance = None
except ImportError: except ImportError:
try: try:
from ipaclient.install import ntpconf as timeconf from ipaclient.install import ntpconf as timeconf
...@@ -196,7 +198,6 @@ class options_obj(object): ...@@ -196,7 +198,6 @@ class options_obj(object):
options = options_obj() options = options_obj()
installer = options installer = options
def api_Backend_ldap2(host_name, setup_ca, connect=False): def api_Backend_ldap2(host_name, setup_ca, connect=False):
# we are sure we have the configuration file ready. # we are sure we have the configuration file ready.
cfg = dict(context='installer', confdir=paths.ETC_IPA, in_server=True, cfg = dict(context='installer', confdir=paths.ETC_IPA, in_server=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment