diff options
author | Steven Hardy <shardy@redhat.com> | 2016-08-28 13:47:56 +0100 |
---|---|---|
committer | Emilien Macchi <emilien@redhat.com> | 2016-09-03 19:46:15 +0000 |
commit | 71b21675954a1c82924646c8034425eb53092daf (patch) | |
tree | d48c9ee2c4c40f536b0f72108a9608567c3c2c75 /network | |
parent | 24c596468baa7a9f306bbe42880348a25e10c788 (diff) |
Create NetIpListMap for all roles
This allows us to create $service_node_ips and $service_node_names
hiera entries for services not deployed on the Controller role.
Co-Authored-By: Thomas Herve <therve@redhat.com>
Change-Id: I688618dda05ff908293c32b9d8518697d57e9eb0
Partially-Implements: blueprint custom-roles
Diffstat (limited to 'network')
-rw-r--r-- | network/ports/net_ip_list_map.yaml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml index 430158ac..07e2de4c 100644 --- a/network/ports/net_ip_list_map.yaml +++ b/network/ports/net_ip_list_map.yaml @@ -78,9 +78,15 @@ outputs: description: > Map of enabled services to a list of hostnames where they're running value: - map_merge: - repeat: - template: - SERVICE_node_names: {get_param: ServiceHostnameList} - for_each: - SERVICE: {get_param: EnabledServices} + yaql: + # If ServiceHostnameList is empty the role is deployed with zero nodes + # therefore we don't want to add any *_node_names to the map + expression: dict($.data.map.items().where(len($[1]) > 0)) + data: + map: + map_merge: + repeat: + template: + SERVICE_node_names: {get_param: ServiceHostnameList} + for_each: + SERVICE: {get_param: EnabledServices} |