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

library/ipatest.py: New return value ca_crt_exists

This will provide information if the ca.crt file exists. This will be needed
to be able to decide what needs to be fixed later on.
parent 0611704c
Branches
Tags
No related merge requests found
...@@ -90,6 +90,10 @@ krb5_keytab_ok: ...@@ -90,6 +90,10 @@ krb5_keytab_ok:
description: The flag describes if krb5.keytab on the host is usable. description: The flag describes if krb5.keytab on the host is usable.
returned: always returned: always
type: bool type: bool
ca_crt_exists:
description: The flag describes if ca.crt exists.
returned: always
type: bool
''' '''
class Object(object): class Object(object):
...@@ -184,6 +188,7 @@ def main(): ...@@ -184,6 +188,7 @@ def main():
sssd = True sssd = True
krb5_keytab_ok = False krb5_keytab_ok = False
ca_crt_exists = os.path.exists(paths.IPA_CA_CRT)
try: try:
(krb_fd, krb_name) = tempfile.mkstemp() (krb_fd, krb_name) = tempfile.mkstemp()
os.close(krb_fd) os.close(krb_fd)
...@@ -219,7 +224,8 @@ def main(): ...@@ -219,7 +224,8 @@ def main():
module.fail_json(msg="Could not remove %s" % krb_name) module.fail_json(msg="Could not remove %s" % krb_name)
module.exit_json(changed=False, module.exit_json(changed=False,
krb5_keytab_ok=krb5_keytab_ok) krb5_keytab_ok=krb5_keytab_ok,
ca_crt_exists=ca_crt_exists)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment