From 35b9949dd470bde5c869a2e097d2da2fc02c6a7c Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 21 Apr 2021 18:39:33 +1000 Subject: [PATCH] Add RootStackName to group_vars After a Overcloud deployment, /etc/hosts on the undercloud will be populated with entries for each overcloud node. Since we use the same tripleo_ansible roles for both the undercloud and overcloud deployment, the /etc/hosts file on the Director will be removed by undercloud install / upgrade operations. This is outlined here: https://bugzilla.redhat.com/show_bug.cgi?id=1933528 This change adds the RootStackName to the group_vars, this is then used by the tripleo_host_entries role in tripleo-ansible to write host entries per stack. Closes-Bug: #1924751 Resolves: rhbz#1933528 Change-Id: I9e53187f37d41d7180e66db1239b5f9c8846addd --- overcloud.j2.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 17ccc9af8b..869bd6c9be 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -318,6 +318,10 @@ parameters: default: {} description: Map of extra global_config_settings data to set on each node. + RootStackName: + description: The name of the stack/plan. + type: string + {% for role in roles %} {%- if role.deprecated_param_scheduler_hints is defined or role.deprecated_param_extraconfig is defined %} {%- if not parameter_groups_defined|default(false) %} @@ -1205,6 +1209,7 @@ outputs: neutron_physical_bridge_name: {get_param: NeutronPhysicalBridge} neutron_public_interface_name: {get_param: NeutronPublicInterface} network_deployment_actions: {get_attr: [{{role.name}}NetworkDeploymentActionsValue, value]} + tripleo_stack_name: {get_param: RootStackName} - {get_param: {{role.name}}ExtraGroupVars} {%- endfor %} RoleNetHostnameMap: