From 7b02fe89d8157676d2ec0514af63f0f8a25e737e Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 23 Aug 2017 18:28:55 +0000 Subject: [PATCH] Determine overcloud_groups variable more intelligently We can use the keys of overcloud_group_hosts_map and overcloud_group_default to make a reasonable estimate of the overcloud groups. --- ansible/group_vars/all/overcloud | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/group_vars/all/overcloud b/ansible/group_vars/all/overcloud index 7d4bbf192..58923c3dc 100644 --- a/ansible/group_vars/all/overcloud +++ b/ansible/group_vars/all/overcloud @@ -7,9 +7,9 @@ overcloud_group_default: controllers # List of names of Ansible groups for overcloud hosts. -overcloud_groups: - - controllers - - monitoring +overcloud_groups: > + {{ (overcloud_group_hosts_map.keys() + + [overcloud_group_default]) | reject('equalto', 'ignore') | unique | sort | list }} # Dict mapping overcloud Ansible group names to lists of hosts in the group. # As a special case, the group 'ignore' can be used to specify hosts that