Merge "Use ansible vars nic config"

This commit is contained in:
Zuul 2019-07-30 01:01:54 +00:00 committed by Gerrit Code Review
commit c098eed3d4
2 changed files with 10 additions and 2 deletions

View File

@ -485,7 +485,7 @@ resources:
NetworkConfig:
type: OS::TripleO::{{role.name}}::Net::SoftwareConfig
properties:
ControlPlaneIp: {get_attr: [{{server_resource_name}}, networks, ctlplane, 0]}
ControlPlaneIp: "{{ '{{' }} ctlplane_ip {{ '}}' }}"
ControlPlaneSubnetCidr:
if:
- ctlplane_subnet_cidr_set
@ -518,7 +518,7 @@ resources:
{%- for network in networks %}
{%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
{{network.name}}IpSubnet: {get_attr: [{{network.name}}Port, ip_subnet]}
{{network.name}}IpSubnet: "{{ '{{' }} {{network.name_lower}}_ip ~ '/' ~ {{network.name_lower}}_cidr {{ '}}' }}"
{{network.name}}InterfaceRoutes:
if:
- {{network.name_lower}}_interface_routes_set

View File

@ -0,0 +1,8 @@
---
features:
- |
The NetworkConfig resource now passes in ansible vars as the values for the
IP parameters to the nic config templates. This enables the nic config
template to be rendered generic per role coming out of Heat by
config-download. The templates can then be reused by any node of that same
role type.