From 81abf6889beec28d500c4a8edde2d746ed6e8962 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Wed, 5 Jun 2024 18:18:56 +0200 Subject: [PATCH] ipareplica: Pass ipareplica_ip_addresses to client deployment part The IP addresses set with ipareplica_ip_addresses have not been passed to ipaclient role for client deployment part. This resulted in not setting the IP addresses. The description for ipareplica_ip_addresses in the ipareplica README and also the role modules was wrong and have been fixed to "List of IPA replica IP addresses". Related: https://pagure.io/freeipa/issue/7405 Resolves: https://github.com/freeipa/ansible-freeipa/issues/1244 --- roles/ipareplica/README.md | 2 +- roles/ipareplica/library/ipareplica_create_ipa_conf.py | 2 +- roles/ipareplica/library/ipareplica_install_ca_certs.py | 2 +- roles/ipareplica/library/ipareplica_prepare.py | 2 +- roles/ipareplica/library/ipareplica_setup_ds.py | 2 +- roles/ipareplica/library/ipareplica_setup_kra.py | 2 +- roles/ipareplica/library/ipareplica_test.py | 2 +- roles/ipareplica/tasks/install.yml | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/ipareplica/README.md b/roles/ipareplica/README.md index f8e6461cbf..5d1ece56fe 100644 --- a/roles/ipareplica/README.md +++ b/roles/ipareplica/README.md @@ -190,7 +190,7 @@ Variable | Description | Required `ipaservers` | This group with the IPA master full qualified hostnames. (list of strings) | mostly `ipareplicas` | Group of IPA replica hostnames. (list of strings) | yes `ipaadmin_password` | The password for the IPA admin user (string) | mostly -`ipareplica_ip_addresses` | The list of master server IP addresses. (list of strings) | no +`ipareplica_ip_addresses` | The list of IPA replica IP addresses. (list of strings) | no `ipareplica_domain` | The primary DNS domain of an existing IPA deployment. (string) | no `ipaserver_realm` | The Kerberos realm of an existing IPA deployment. (string) | no `ipaserver_hostname` | Fully qualified name of the server. (string) | no diff --git a/roles/ipareplica/library/ipareplica_create_ipa_conf.py b/roles/ipareplica/library/ipareplica_create_ipa_conf.py index 84ba55562c..2909f4eb95 100644 --- a/roles/ipareplica/library/ipareplica_create_ipa_conf.py +++ b/roles/ipareplica/library/ipareplica_create_ipa_conf.py @@ -47,7 +47,7 @@ type: str required: no ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/library/ipareplica_install_ca_certs.py b/roles/ipareplica/library/ipareplica_install_ca_certs.py index 8aba576a45..2f7ebad02f 100644 --- a/roles/ipareplica/library/ipareplica_install_ca_certs.py +++ b/roles/ipareplica/library/ipareplica_install_ca_certs.py @@ -47,7 +47,7 @@ type: str required: no ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/library/ipareplica_prepare.py b/roles/ipareplica/library/ipareplica_prepare.py index ab772f7300..7496594605 100644 --- a/roles/ipareplica/library/ipareplica_prepare.py +++ b/roles/ipareplica/library/ipareplica_prepare.py @@ -49,7 +49,7 @@ type: str required: no ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/library/ipareplica_setup_ds.py b/roles/ipareplica/library/ipareplica_setup_ds.py index 64f5a61b7b..c3636d57cf 100644 --- a/roles/ipareplica/library/ipareplica_setup_ds.py +++ b/roles/ipareplica/library/ipareplica_setup_ds.py @@ -47,7 +47,7 @@ type: str required: no ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/library/ipareplica_setup_kra.py b/roles/ipareplica/library/ipareplica_setup_kra.py index 866b4bc658..dfe33a7c81 100644 --- a/roles/ipareplica/library/ipareplica_setup_kra.py +++ b/roles/ipareplica/library/ipareplica_setup_kra.py @@ -47,7 +47,7 @@ type: str required: no ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/library/ipareplica_test.py b/roles/ipareplica/library/ipareplica_test.py index a29368e7cb..06ecad4e51 100644 --- a/roles/ipareplica/library/ipareplica_test.py +++ b/roles/ipareplica/library/ipareplica_test.py @@ -38,7 +38,7 @@ description: IPA replica deployment tests options: ip_addresses: - description: List of Master Server IP Addresses + description: List of IPA replica IP addresses type: list elements: str required: no diff --git a/roles/ipareplica/tasks/install.yml b/roles/ipareplica/tasks/install.yml index 076842a384..4bee1c7b81 100644 --- a/roles/ipareplica/tasks/install.yml +++ b/roles/ipareplica/tasks/install.yml @@ -125,6 +125,7 @@ ipaclient_realm: "{{ result_ipareplica_test.realm | default(omit) }}" ipaclient_servers: "{{ ipareplica_servers | default(omit) }}" ipaclient_hostname: "{{ result_ipareplica_test.hostname }}" + ipaclient_ip_addresses: "{{ ipareplica_ip_addresses | default(omit) }}" ipaclient_install_packages: "{{ ipareplica_install_packages }}" when: not result_ipareplica_test.client_enrolled