mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
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.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user