diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index cf3a5e4f45..3798480e09 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -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 diff --git a/releasenotes/notes/nic-config-ansible-vars-1943a9f2dcab5477.yaml b/releasenotes/notes/nic-config-ansible-vars-1943a9f2dcab5477.yaml new file mode 100644 index 0000000000..eaf4912798 --- /dev/null +++ b/releasenotes/notes/nic-config-ansible-vars-1943a9f2dcab5477.yaml @@ -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.