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

library/ipajoin.py: Fail for already joined hosts if krb5.keytab is missing

It is not possible to restore a missing krb5.keytab using the admin
credential. Therefore the only way is to fail in this case.
parent 375500df
No related branches found
No related tags found
No related merge requests found
...@@ -332,6 +332,10 @@ def main(): ...@@ -332,6 +332,10 @@ def main():
changed = True changed = True
module.log("Enrolled in IPA realm %s" % realm) module.log("Enrolled in IPA realm %s" % realm)
# Fix missing krb5.keytab file for already joined host
if already_joined and not os.path.exists(paths.KRB5_KEYTAB):
module.fail_json(msg="krb5.keytab missing! Retry with ipaclient_force_join=yes to generate a new one.")
start = stderr.find('Certificate subject base is: ') start = stderr.find('Certificate subject base is: ')
if start >= 0: if start >= 0:
start = start + 29 start = start + 29
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment