From 0611704cb5ed7eb0475180ecaea9439a44758018 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 2 Oct 2017 19:00:25 +0200 Subject: [PATCH] library/ipatest.py: Fix krb5_keytab_ok detection to work always --- library/ipatest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ipatest.py b/library/ipatest.py index df1bd7ac..c5e89c29 100644 --- a/library/ipatest.py +++ b/library/ipatest.py @@ -183,7 +183,7 @@ def main(): host_principal = 'host/%s@%s' % (hostname, realm) sssd = True - krb5_keytab_ok = True + krb5_keytab_ok = False try: (krb_fd, krb_name) = tempfile.mkstemp() os.close(krb_fd) @@ -208,10 +208,9 @@ def main(): paths.IPA_DNS_CCACHE, config=krb_name, attempts=kinit_attempts) + krb5_keytab_ok = True except gssapi.exceptions.GSSError as e: - # failure to get ticket makes it impossible to login and bind - # from sssd to LDAP, abort installation and rollback changes - krb5_keytab_ok = False + pass finally: try: @@ -219,7 +218,8 @@ def main(): except OSError: module.fail_json(msg="Could not remove %s" % krb_name) - module.exit_json(changed=False, krb5_keytab_ok=krb5_keytab_ok) + module.exit_json(changed=False, + krb5_keytab_ok=krb5_keytab_ok) if __name__ == '__main__': main() -- GitLab