New role for ipareplica installation

The support for external cert files is not complete yet.

Please have a look at the example inventory file inventory/hosts.replica and
also the install and uninstall playbook files install-replica.yml and
uninstall-replica.yml
This commit is contained in:
Thomas Woerner
2018-04-04 15:25:57 +02:00
parent 71ec4d4e2a
commit 53d984f1e8
42 changed files with 6475 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---
# tasks to uninstall IPA replica
#- name: Uninstall - Include Python2/3 import test
# include: "{{role_path}}/tasks/python_2_3_test.yml"
# static: yes
- name: Uninstall - Uninstall IPA replica
command: >
/usr/sbin/ipa-server-install
--uninstall
-U
{{ "--ignore-topology-disconnect" if ipareplica_ignore_topology_disconnect | bool else "" }}
{{ "--ignore-last-of-role" if ipareplica_ignore_last_of_role | bool else "" }}
register: result_uninstall
# 2 means that uninstall failed because IPA replica was not configured
failed_when: result_uninstall.rc != 0 and "'Env' object has no attribute 'basedn'" not in result_uninstall.stderr
#IPA server is not configured on this system" not in result_uninstall.stdout_lines
#changed_when: result_uninstall.rc == 0
#until: result_uninstall.rc == 0
retries: 2
delay: 1
- name: Uninstall - Remove all replication agreements and data about replica
command: >
/usr/sbin/ipa-replica-manage
del
{{ ipareplica_hostname | default(ansible_fqdn) }}
--force
--password={{ ipadm_password }}
failed_when: False
delegate_to: "{{ groups.ipaserver[0] | default(fail) }}"
#- name: Remove IPA replica packages
# package:
# name: "{{ item }}"
# state: absent
# with_items: "{{ ipareplica_packages }}"