From 3d47ce35e4daf0407d760a6693578dde7bd17cf2 Mon Sep 17 00:00:00 2001 From: Michal Konecny Date: Tue, 28 Nov 2023 16:47:58 +0100 Subject: [PATCH] [ipa/server] Add missing topology segments This command adds missing topology segments to already existing IPA nodes. Signed-off-by: Michal Konecny --- roles/ipa/server/tasks/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/roles/ipa/server/tasks/main.yml b/roles/ipa/server/tasks/main.yml index 3c5be612c5..f803f9bbc5 100644 --- a/roles/ipa/server/tasks/main.yml +++ b/roles/ipa/server/tasks/main.yml @@ -608,6 +608,39 @@ - ipa/server - config + # Add the missing topology segments that are missed during replication + # Ignore any failure as that means that segment is already in place +- name: Add the missing segments for ca suffix + command: + argv: + - ipa + - topologysegment-add + - leftnode="{{ inventory_hostname }}" + - rightnode="{{ hostvars[item]['ansible_hostname'] }}" + - "ca" + - "{{ inventory_hostname-hostvars[item]['ansible_hostname']}}" + with_items: "{{ (env == 'production')|ternary(groups['ipa'], groups['ipa_stg']) }}" + ignore_errors: true + tags: + - ipa/server + - config + + # Add the missing topology segments that are missed during replication + # Ignore any failure as that means that segment is already in place +- name: Add the missing segments for domain suffix + command: + argv: + - ipa + - topologysegment-add + - leftnode="{{ inventory_hostname }}" + - rightnode="{{ hostvars[item]['ansible_hostname'] }}" + - "domain" + - "{{ inventory_hostname-hostvars[item]['ansible_hostname']}}" + with_items: "{{ (env == 'production')|ternary(groups['ipa'], groups['ipa_stg']) }}" + ignore_errors: true + tags: + - ipa/server + - config - name: Destroy admin ticket command: kdestroy -A