mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 13:53:23 +00:00
Merge pull request #308 from rjeffman/ipaservice_fix_service_disable
Fixes service disable when service has no certificates attached.
This commit is contained in:
@@ -812,9 +812,11 @@ def main():
|
||||
|
||||
elif state == "disabled":
|
||||
if action == "service":
|
||||
if res_find is not None and \
|
||||
len(res_find.get('usercertificate', [])) > 0:
|
||||
commands.append([name, 'service_disable', {}])
|
||||
if res_find is not None:
|
||||
has_cert = bool(res_find.get('usercertificate'))
|
||||
has_keytab = res_find.get('has_keytab', False)
|
||||
if has_cert or has_keytab:
|
||||
commands.append([name, 'service_disable', {}])
|
||||
else:
|
||||
ansible_module.fail_json(
|
||||
msg="Invalid action '%s' for state '%s'" %
|
||||
|
||||
Reference in New Issue
Block a user