diff --git a/roles/ipaclient/library/ipahost.py b/roles/ipaclient/library/ipahost.py index 274cb699caa6d244e3e266b380de713a236721f2..68904e3d6c687c447ad1c2878e7f1c5d90ad3122 100644 --- a/roles/ipaclient/library/ipahost.py +++ b/roles/ipaclient/library/ipahost.py @@ -353,7 +353,7 @@ def main(): except Exception as e: module.fail_json(msg="ipahost module failed : %s" % str(e)) finally: - run(["kdestroy"], raiseonerr=False, env=os.environ) + run([paths.KDESTROY], raiseonerr=False, env=os.environ) module.exit_json(changed=changed, host=host) diff --git a/roles/ipaclient/library/ipajoin.py b/roles/ipaclient/library/ipajoin.py index e559f3cf9c94b5719706264a762f7c539625f32d..11a3fc14fa626ec5cdeaced223063e4df61d37e2 100644 --- a/roles/ipaclient/library/ipajoin.py +++ b/roles/ipaclient/library/ipajoin.py @@ -263,7 +263,7 @@ def main(): module.log("Host is already joined") else: if principal: - run(["kdestroy"], raiseonerr=False, env=env) + run([paths.KDESTROY], raiseonerr=False, env=env) module.fail_json(msg="Joining realm failed: %s" % stderr) else: changed = True @@ -274,7 +274,7 @@ def main(): module.fail_json(msg="krb5.keytab missing! Retry with ipaclient_force_join=yes to generate a new one.") if principal: - run(["kdestroy"], raiseonerr=False, env=env) + run([paths.KDESTROY], raiseonerr=False, env=env) # Obtain the TGT. We do it with the temporary krb5.conf, sot # tha only the KDC we're installing under is contacted. diff --git a/roles/ipaclient/library/ipanss.py b/roles/ipaclient/library/ipanss.py index 09b37fe5241cec6e2092a39410bcfe51d4f8aea3..41ff894e8f310f4da40e26ac1110c5849e301bf1 100644 --- a/roles/ipaclient/library/ipanss.py +++ b/roles/ipaclient/library/ipanss.py @@ -288,7 +288,7 @@ def main(): # Particulary, SSSD might take longer than 6-8 seconds. while n < 10 and not found: try: - ipautil.run(["getent", "passwd", user]) + ipautil.run([paths.GETENT if hasattr(paths, "KDESTROY") else "getent", "passwd", user]) found = True except Exception as e: time.sleep(1)