From: Steven Hardy Date: Tue, 24 Oct 2017 09:30:39 +0000 (+0100) Subject: Add NetIpMap to hieradata for *ExtraConfig overrides X-Git-Tag: opnfv-6.0.0~42^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=7779bc8ad0ab43e2f57225cfded51e7e2ae18004;p=apex-tripleo-heat-templates.git Add NetIpMap to hieradata for *ExtraConfig overrides To enable per-node override of bind IPs via the per-role ExtraConfig paramaters, we need to enable hiera interpolation that references the keys defined in NetIpMap, so we add them to the hieradata. To minimise the risk of any conflicts in keynames it's added near the bottom of the hierarchy, but I'm not aware of any conflicting names in our templates/modules. This will allow per-node hieradata override of bind IPs e.g: parameter_defaults: ComputeRack1ExtraConfig: nova::vncproxy::host: "%{hiera('rack1_internal_api')}" ComputeRack2ExtraConfig: nova::vncproxy::host: "%{hiera('rack2_internal_api')}" Closes-Bug: #1726884 Change-Id: Icf7da1d78176c2ee0197ff2459d69d995cbb16ad (cherry picked from commit 65a8b65754d2ea77ec2396658d4e73eb837d34bd) --- diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index 15da1773..d53afd04 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -565,6 +565,7 @@ resources: - bootstrap_node # provided by allNodesConfig - all_nodes # provided by allNodesConfig - vip_data # provided by allNodesConfig + - net_ip_map - '"%{::osfamily}"' # The following are required for compatibility with the Controller role # where some vendor integrations added hieradata via ExtraConfigPre @@ -578,6 +579,7 @@ resources: service_names: service_names: {get_param: ServiceNames} sensu::subscriptions: {get_param: MonitoringSubscriptions} + net_ip_map: {get_attr: [NetIpMap, net_ip_map]} service_configs: map_replace: - {get_param: ServiceConfigSettings}