Skip to content

Commit

Permalink
Merge pull request freeipa#1226 from t-woerner/ipalib.install.kinit_m…
Browse files Browse the repository at this point in the history
…oved_to_ipalib_freeipa_7286

ipalib.install.kinit moved to ipalib
  • Loading branch information
rjeffman authored Mar 28, 2024
2 parents 4ceb6aa + 35614d7 commit cbff802
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
8 changes: 6 additions & 2 deletions plugins/module_utils/ansible_freeipa_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ def getargspec(func):
from ipalib.constants import DEFAULT_CONFIG, LDAP_GENERALIZED_TIME_FORMAT

try:
from ipalib.install.kinit import kinit_password, kinit_keytab
from ipalib.kinit import kinit_password, kinit_keytab
except ImportError:
from ipapython.ipautil import kinit_password, kinit_keytab
try:
from ipalib.install.kinit import kinit_password, kinit_keytab
except ImportError:
# pre 4.5.0
from ipapython.ipautil import kinit_password, kinit_keytab
from ipapython.ipautil import run
from ipapython.ipautil import template_str
from ipapython.dn import DN
Expand Down
8 changes: 6 additions & 2 deletions roles/ipaclient/library/ipaclient_get_otp.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@
from ipapython.ipautil import run
from ipalib.constants import DEFAULT_CONFIG
try:
from ipalib.install.kinit import kinit_password, kinit_keytab
from ipalib.kinit import kinit_password, kinit_keytab
except ImportError:
from ipapython.ipautil import kinit_password, kinit_keytab
try:
from ipalib.install.kinit import kinit_password, kinit_keytab
except ImportError:
# pre 4.5.0
from ipapython.ipautil import kinit_password, kinit_keytab
except ImportError as _err:
MODULE_IMPORT_ERROR = str(_err)
else:
Expand Down
8 changes: 6 additions & 2 deletions roles/ipaclient/module_utils/ansible_ipa_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,13 @@ def knobs(self):
ipa_generate_password
from ipapython.dn import DN
try:
from ipalib.install.kinit import kinit_keytab, kinit_password
from ipalib.kinit import kinit_password, kinit_keytab
except ImportError:
from ipapython.ipautil import kinit_keytab, kinit_password
try:
from ipalib.install.kinit import kinit_keytab, kinit_password
except ImportError:
# pre 4.5.0
from ipapython.ipautil import kinit_keytab, kinit_password
from ipapython.ipa_log_manager import standard_logging_setup
from gssapi.exceptions import GSSError
try:
Expand Down
5 changes: 4 additions & 1 deletion roles/ipareplica/module_utils/ansible_ipa_replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def getargspec(func):
from ipaclient.install.ipachangeconf import IPAChangeConf
from ipalib.install import certstore, sysrestore
from ipapython.ipautil import ipa_generate_password
from ipalib.install.kinit import kinit_keytab
try:
from ipalib.kinit import kinit_keytab
except ImportError:
from ipalib.install.kinit import kinit_keytab
from ipapython import ipaldap, ipautil, kernel_keyring
from ipapython.certdb import IPA_CA_TRUST_FLAGS, \
EXTERNAL_CA_TRUST_FLAGS
Expand Down
8 changes: 6 additions & 2 deletions roles/ipaserver/library/ipaserver_get_connected_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@
from ipapython.ipautil import run
from ipalib.constants import DEFAULT_CONFIG
try:
from ipalib.install.kinit import kinit_password
from ipalib.kinit import kinit_password
except ImportError:
from ipapython.ipautil import kinit_password
try:
from ipalib.install.kinit import kinit_password
except ImportError:
# pre 4.5.0
from ipapython.ipautil import kinit_password
except ImportError as _err:
MODULE_IMPORT_ERROR = str(_err)
else:
Expand Down

0 comments on commit cbff802

Please sign in to comment.