mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 19:34:45 +00:00
ipaserver: Drop ipaserver_allow_repair
There is no way to repair a server installation like it is possible with a client.
This commit is contained in:
@@ -32,7 +32,6 @@ ipaserver_enable_compat: no
|
|||||||
ipaserver_setup_ca: yes
|
ipaserver_setup_ca: yes
|
||||||
|
|
||||||
### additional ###
|
### additional ###
|
||||||
ipaserver_allow_repair: no
|
|
||||||
ipaserver_allow_missing: [ ]
|
ipaserver_allow_missing: [ ]
|
||||||
|
|
||||||
### uninstall ###
|
### uninstall ###
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ def main():
|
|||||||
secondary_rid_base=dict(required=False, type='int'),
|
secondary_rid_base=dict(required=False, type='int'),
|
||||||
|
|
||||||
### additional ###
|
### additional ###
|
||||||
allow_repair=dict(required=False, type='bool', default=False),
|
|
||||||
),
|
),
|
||||||
supports_check_mode = True,
|
supports_check_mode = True,
|
||||||
)
|
)
|
||||||
@@ -193,7 +192,6 @@ def main():
|
|||||||
options.secondary_rid_base = ansible_module.params.get('secondary_rid_base')
|
options.secondary_rid_base = ansible_module.params.get('secondary_rid_base')
|
||||||
|
|
||||||
### additional ###
|
### additional ###
|
||||||
allow_repair = ansible_module.params.get('allow_repair')
|
|
||||||
|
|
||||||
# version specific ######################################################
|
# version specific ######################################################
|
||||||
|
|
||||||
@@ -425,14 +423,14 @@ def main():
|
|||||||
|
|
||||||
options._installation_cleanup = True
|
options._installation_cleanup = True
|
||||||
if not options.external_ca and len(options.external_cert_files) < 1 and \
|
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
|
options._installation_cleanup = False
|
||||||
ansible_module.fail_json(msg=
|
ansible_module.fail_json(msg=
|
||||||
"IPA server is already configured on this system. If you want "
|
"IPA server is already configured on this system. If you want "
|
||||||
"to reinstall the IPA server, please uninstall it first.")
|
"to reinstall the IPA server, please uninstall it first.")
|
||||||
|
|
||||||
client_fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
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
|
options._installation_cleanup = False
|
||||||
ansible_module.fail_json(
|
ansible_module.fail_json(
|
||||||
msg="IPA client is already configured on this system. "
|
msg="IPA client is already configured on this system. "
|
||||||
@@ -497,8 +495,8 @@ def main():
|
|||||||
tasks.check_selinux_status()
|
tasks.check_selinux_status()
|
||||||
|
|
||||||
_installation_cleanup = True
|
_installation_cleanup = True
|
||||||
if (not options.external_ca and not options.external_cert_files and
|
if not options.external_ca and not options.external_cert_files and \
|
||||||
is_ipa_configured() and not allow_repair):
|
is_ipa_configured():
|
||||||
_installation_cleanup = False
|
_installation_cleanup = False
|
||||||
ansible_module.fail_json(msg="IPA server is already configured on this system.")
|
ansible_module.fail_json(msg="IPA server is already configured on this system.")
|
||||||
|
|
||||||
@@ -521,8 +519,7 @@ def main():
|
|||||||
try:
|
try:
|
||||||
check_dirsrv(True)
|
check_dirsrv(True)
|
||||||
except ScriptError as e:
|
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:
|
if not options.no_ntp:
|
||||||
try:
|
try:
|
||||||
@@ -535,7 +532,7 @@ def main():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# Check to see if httpd is already configured to listen on 443
|
# 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.")
|
ansible_module.fail_json(msg="httpd is already configured to listen on 443.")
|
||||||
|
|
||||||
# check bind packages are installed
|
# check bind packages are installed
|
||||||
|
|||||||
@@ -89,7 +89,6 @@
|
|||||||
secondary_rid_base: "{{ ipaserver_secondary_rid_base | default(omit) }}"
|
secondary_rid_base: "{{ ipaserver_secondary_rid_base | default(omit) }}"
|
||||||
|
|
||||||
### additional ###
|
### additional ###
|
||||||
allow_repair: "{{ ipaserver_allow_repair }}"
|
|
||||||
register: ipaserver_test
|
register: ipaserver_test
|
||||||
|
|
||||||
|
|
||||||
@@ -400,7 +399,6 @@
|
|||||||
# #no_ssh: "{{ ipaserver_no_ssh }}"
|
# #no_ssh: "{{ ipaserver_no_ssh }}"
|
||||||
# #no_sshd: "{{ ipaserver_no_sshd }}"
|
# #no_sshd: "{{ ipaserver_no_sshd }}"
|
||||||
# mkhomedir: "{{ ipaserver_mkhomedir }}"
|
# mkhomedir: "{{ ipaserver_mkhomedir }}"
|
||||||
# #allow_repair: "{{ ipaserver_allow_repair }}"
|
|
||||||
|
|
||||||
- name: Install - Setup client
|
- name: Install - Setup client
|
||||||
command: >
|
command: >
|
||||||
|
|||||||
Reference in New Issue
Block a user