mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
ipareplica/server: Enable removal from domain with undeployment
New variables have been added to ipareplica and ipaserver role to enable the removal from the domein with the undeployment. `ipaserver_remove_from_domain` This enables the removal of the server from the domain additionally to the undeployment. `ipaserver_remove_on_server` The value defines the server/replica in the domain that will to be used to remove the server/replica from the domain if `ipaserver_ignore_topology_disconnect` and `ipaserver_remove_from_domain` are enabled. Without the need to enable `ipaserver_ignore_topology_disconnect`, the value will be automatically detected using the replication agreements of the server/replica. For the replica role it is possible to use the server variables, but also the replica versions: `ipareplica_remove_from_domain` and `ipareplica_remove_on_server`. The already existing parameters `ipaserver_ignore_topology_disconnect` and `ipaserver_ignore_last_of_role` have been added to the README files for server and replica with descriptions. The same for the replica versions of the parameters. The ipareplica role is not calling the `ipa-server-install` anymore, it is instead using (including) the server role for the task. The new module `ipaserver_get_connected_server` has been added to the server role to be able to get a connected server using the replication agreements. This module is only used if `ipaserver_ignore_topology_disconnect` is not needed.
This commit is contained in:
@@ -114,6 +114,50 @@ Example playbook to setup the IPA client(s) using principal and password from in
|
||||
state: present
|
||||
```
|
||||
|
||||
Example inventory file to remove a replica from the domain:
|
||||
|
||||
```ini
|
||||
[ipareplicas]
|
||||
ipareplica1.example.com
|
||||
|
||||
[ipareplicas:vars]
|
||||
ipaadmin_password=MySecretPassword123
|
||||
ipareplica_remove_from_domain=true
|
||||
```
|
||||
|
||||
Example playbook to remove an IPA replica using admin passwords from the domain:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook to remove IPA replica
|
||||
hosts: ipareplica
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- role: ipareplica
|
||||
state: absent
|
||||
```
|
||||
|
||||
The inventory will enable the removal of the replica (also a replica) from the domain. Additional options are needed if the removal of the replica is resulting in a topology disconnect or if the replica is the last that has a role.
|
||||
|
||||
To continue with the removal with a topology disconnect it is needed to set these parameters:
|
||||
|
||||
```ini
|
||||
ipareplica_ignore_topology_disconnect=true
|
||||
ipareplica_remove_on_server=ipareplica2.example.com
|
||||
```
|
||||
|
||||
To continue with the removal for a replica that is the last that has a role:
|
||||
|
||||
```ini
|
||||
ipareplica_ignore_last_of_role=true
|
||||
```
|
||||
|
||||
Be careful with enabling the `ipareplica_ignore_topology_disconnect` and especially `ipareplica_ignore_last_of_role`, the change can not be reverted easily.
|
||||
|
||||
The parameters `ipaserver_ignore_topology_disconnect`, `ipaserver_ignore_last_of_role`, `ipaserver_remove_on_server` and `ipaserver_remove_from_domain` can be used instead.
|
||||
|
||||
|
||||
Playbooks
|
||||
=========
|
||||
|
||||
@@ -255,6 +299,19 @@ Variable | Description | Required
|
||||
`ipareplica_setup_firewalld` | The value defines if the needed services will automatically be openen in the firewall managed by firewalld. (bool, default: true) | no
|
||||
`ipareplica_firewalld_zone` | The value defines the firewall zone that will be used. This needs to be an existing runtime and permanent zone. (string) | no
|
||||
|
||||
Undeploy Variables (`state`: absent)
|
||||
------------------------------------
|
||||
|
||||
These settings should only be used if the result is really wanted. The change might not be revertable easily.
|
||||
|
||||
Variable | Description | Required
|
||||
-------- | ----------- | --------
|
||||
`ipareplica_ignore_topology_disconnect` \| `ipaserver_ignore_topology_disconnect` | If enabled this enforces the removal of the replica even if it results in a topology disconnect. Be careful with this setting. (bool) | false
|
||||
`ipareplica_ignore_last_of_role` \| `ipaserver_ignore_last_of_role` | If enabled this enforces the removal of the replica even if the replica is the last with one that has a role. Be careful, this might not be revered easily. (bool) | false
|
||||
`ipareplica_remove_from_domain` \| `ipaserver_remove_from_domain` | This enables the removal of the replica from the domain additionally to the undeployment. (bool) | false
|
||||
`ipareplica_remove_on_server` \| `ipaserver_remove_on_server` | The value defines the replica in the domain that will to be used to remove the replica from the domain if `ipareplica_ignore_topology_disconnect` and `ipareplica_remove_from_domain` are enabled. Without the need to enable `ipareplica_ignore_topology_disconnect`, the value will be automatically detected using the replication agreements of the replica. (string) | false
|
||||
|
||||
|
||||
Authors
|
||||
=======
|
||||
|
||||
|
||||
Reference in New Issue
Block a user