Merge "Only add host entries for role_networks"
This commit is contained in:
@@ -44,9 +44,13 @@ provisioner:
|
||||
tripleo_hosts_entries_extra_hosts_entries: []
|
||||
tripleo_hosts_entries_vip_hosts_entries: []
|
||||
cloud_domain: localdomain
|
||||
enabled_networks:
|
||||
- ctlplane
|
||||
- InternalApi
|
||||
role_networks:
|
||||
- ctlplane
|
||||
- InternalApi
|
||||
- DisabledNet
|
||||
networks:
|
||||
ctlplane:
|
||||
name_lower: ctlplane
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
{% for host in groups['overcloud'] -%}
|
||||
{{ hostvars[host][hostvars[host]['hostname_resolve_network'] ~ '_ip'] ~ ' ' ~
|
||||
host ~ '.' ~ cloud_domain ~ ' ' ~ host }}
|
||||
{% if role_networks is not none -%}
|
||||
{% set _networks = (enabled_networks | default([])) | union(role_networks | default([])) -%}
|
||||
{# ## NOTE(hjensas): The Undercloud Minion has no networks, need to check for that here. -#}
|
||||
{% if hostvars[host]['role_networks'] is not none -%}
|
||||
{% set _role_networks = hostvars[host]['role_networks'] | default ([]) -%}
|
||||
{% set _networks = (enabled_networks | default([])) | intersect(_role_networks) -%}
|
||||
{% for network in _networks -%}
|
||||
{{ hostvars[host][networks[network]['name_lower'] ~ '_ip'] ~ ' ' ~
|
||||
host ~ '.' ~ network.lower() ~ '.' ~ cloud_domain ~ ' ' ~
|
||||
|
||||
Reference in New Issue
Block a user