From cce86d09efa77f11851636a39870efb1d1bb9895 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 29 Jan 2018 17:22:25 +0100 Subject: [PATCH] ipaserver: Drop ipaserver_allow_repair There is no way to repair a server installation like it is possible with a client. --- roles/ipaserver/defaults/main.yml | 1 - roles/ipaserver/library/ipaserver_test.py | 15 ++++++--------- roles/ipaserver/tasks/install.yml | 2 -- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/roles/ipaserver/defaults/main.yml b/roles/ipaserver/defaults/main.yml index ae106aa8..4af79109 100644 --- a/roles/ipaserver/defaults/main.yml +++ b/roles/ipaserver/defaults/main.yml @@ -32,7 +32,6 @@ ipaserver_enable_compat: no ipaserver_setup_ca: yes ### additional ### -ipaserver_allow_repair: no ipaserver_allow_missing: [ ] ### uninstall ### diff --git a/roles/ipaserver/library/ipaserver_test.py b/roles/ipaserver/library/ipaserver_test.py index 83e61511..e7f2a68e 100644 --- a/roles/ipaserver/library/ipaserver_test.py +++ b/roles/ipaserver/library/ipaserver_test.py @@ -118,7 +118,6 @@ def main(): secondary_rid_base=dict(required=False, type='int'), ### additional ### - allow_repair=dict(required=False, type='bool', default=False), ), supports_check_mode = True, ) @@ -193,7 +192,6 @@ def main(): options.secondary_rid_base = ansible_module.params.get('secondary_rid_base') ### additional ### - allow_repair = ansible_module.params.get('allow_repair') # version specific ###################################################### @@ -425,14 +423,14 @@ def main(): options._installation_cleanup = True if not options.external_ca and len(options.external_cert_files) < 1 and \ - is_ipa_configured() and not allow_repair: + is_ipa_configured(): options._installation_cleanup = False ansible_module.fail_json(msg= "IPA server is already configured on this system. If you want " "to reinstall the IPA server, please uninstall it first.") client_fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE) - if client_fstore.has_files() and not allow_repair: + if client_fstore.has_files(): options._installation_cleanup = False ansible_module.fail_json( msg="IPA client is already configured on this system. " @@ -497,8 +495,8 @@ def main(): tasks.check_selinux_status() _installation_cleanup = True - if (not options.external_ca and not options.external_cert_files and - is_ipa_configured() and not allow_repair): + if not options.external_ca and not options.external_cert_files and \ + is_ipa_configured(): _installation_cleanup = False ansible_module.fail_json(msg="IPA server is already configured on this system.") @@ -521,8 +519,7 @@ def main(): try: check_dirsrv(True) except ScriptError as e: - if not allow_repair: - ansible_module.fail_json(msg=e) + ansible_module.fail_json(msg=e) if not options.no_ntp: try: @@ -535,7 +532,7 @@ def main(): pass # Check to see if httpd is already configured to listen on 443 - if httpinstance.httpd_443_configured() and not allow_repair: + if httpinstance.httpd_443_configured(): ansible_module.fail_json(msg="httpd is already configured to listen on 443.") # check bind packages are installed diff --git a/roles/ipaserver/tasks/install.yml b/roles/ipaserver/tasks/install.yml index 69349e5a..ab98839d 100644 --- a/roles/ipaserver/tasks/install.yml +++ b/roles/ipaserver/tasks/install.yml @@ -89,7 +89,6 @@ secondary_rid_base: "{{ ipaserver_secondary_rid_base | default(omit) }}" ### additional ### - allow_repair: "{{ ipaserver_allow_repair }}" register: ipaserver_test @@ -400,7 +399,6 @@ # #no_ssh: "{{ ipaserver_no_ssh }}" # #no_sshd: "{{ ipaserver_no_sshd }}" # mkhomedir: "{{ ipaserver_mkhomedir }}" - # #allow_repair: "{{ ipaserver_allow_repair }}" - name: Install - Setup client command: > -- GitLab