From: Steven Hardy Date: Tue, 24 Jan 2017 23:17:50 +0000 (+0000) Subject: Remove spurious for loop from post deploy j2 X-Git-Tag: opnfv-6.0.0~1181^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=d33422d635590ac02e7fb201447ed4a2c801cf35;p=apex-tripleo-heat-templates.git Remove spurious for loop from post deploy j2 This nested for loop is wrong as it generates all steps for all roles twice. This works because yaml parsing ignores the duplicate resources, but it's a big waste of space in swift (this fix reduces the rendered file size by over 2000 lines with the default roles!) Change-Id: Ifaf860020839390147c92848d52b1a59e355dc50 Closes-Bug: #1659139 --- diff --git a/puppet/post.j2.yaml b/puppet/post.j2.yaml index 2a02ea19..83c32868 100644 --- a/puppet/post.j2.yaml +++ b/puppet/post.j2.yaml @@ -21,11 +21,10 @@ parameters: perform configuration on a Heat stack-update. resources: - -{% for role in roles %} # Post deployment steps for all roles # A single config is re-applied with an incrementing step number - # {{role.name}} Role steps +{% for role in roles %} + # {{role.name}} Role post deploy steps {{role.name}}ArtifactsConfig: type: deploy-artifacts.yaml @@ -58,8 +57,6 @@ resources: # Step through a series of configuration steps {% for step in range(1, 6) %} - {% for role in roles %} - {{role.name}}Deployment_Step{{step}}: type: OS::Heat::StructuredDeploymentGroup {% if step == 1 %} @@ -77,8 +74,6 @@ resources: input_values: step: {{step}} update_identifier: {get_param: DeployIdentifier} - - {% endfor %} {% endfor %} {{role.name}}PostConfig: