From dfc1adf6a078121933e76abb5425998846768d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Thu, 28 Oct 2021 12:57:30 +0200 Subject: [PATCH] Use allovercloud ansible group With certmonger management moving to ansible, we lose the "certmonger_user" service, hence the ansible inventory group. We can therefore use the "allovercloud" group instead - it will clean the OC nodes while preserving the undercloud node. This patch also drops the "loop" setting the "hosts_list" fact in favor of a more efficient |map() filter. Resolves: rhbz#2017849 Change-Id: Icd662f74fc40bb6c1b5e4e01a236e1994ca3cc83 --- tripleo_ipa/playbooks/cli-cleanup-ipa.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tripleo_ipa/playbooks/cli-cleanup-ipa.yml b/tripleo_ipa/playbooks/cli-cleanup-ipa.yml index abe28cc..9a39d66 100644 --- a/tripleo_ipa/playbooks/cli-cleanup-ipa.yml +++ b/tripleo_ipa/playbooks/cli-cleanup-ipa.yml @@ -57,8 +57,7 @@ - name: create list of hosts to clean up in IPA set_fact: - hosts_list: "{{ hosts_list + [ hostvars[item]['canonical_hostname'] ] }}" - loop: "{{ groups.certmonger_user | default([]) }}" + hosts_list: "{{ groups.allovercloud | map('extract', hostvars, 'canonical_hostname') | list }}" - name: import cleanup tasks from the tripleo-ipa role include_role: