diff options
Diffstat (limited to 'puppet/puppet-steps.j2')
-rw-r--r-- | puppet/puppet-steps.j2 | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/puppet/puppet-steps.j2 b/puppet/puppet-steps.j2 index 82c6171e..542af42c 100644 --- a/puppet/puppet-steps.j2 +++ b/puppet/puppet-steps.j2 @@ -1,16 +1,15 @@ {% set deploy_steps_max = 6 %} - conditions: {% for step in range(1, deploy_steps_max) %} WorkflowTasks_Step{{step}}_Enabled: or: - {% for role in roles %} + {%- for role in roles %} - not: equals: - get_param: [role_data, {{role.name}}, service_workflow_tasks, step{{step}}] - '' - False - {% endfor %} + {%- endfor %} {% endfor %} resources: @@ -37,7 +36,7 @@ resources: {{role.name}}Config: type: OS::TripleO::{{role.name}}Config properties: - StepConfig: {list_join: ["\n", {get_param: [role_data, {{role.name}}, step_config]}]} + StepConfig: {get_param: [role_data, {{role.name}}, step_config]} # Step through a series of configuration steps {% for step in range(1, deploy_steps_max) %} @@ -50,16 +49,16 @@ resources: # WorkflowTasks_StepX resource and can be remove # if https://bugs.launchpad.net/heat/+bug/1700569 # is fixed. - {% if step == 1 %} - {% for dep in roles %} + {%- if step == 1 %} + {%- for dep in roles %} - {{dep.name}}PreConfig - {{dep.name}}ArtifactsDeploy - {% endfor %} - {% else %} - {% for dep in roles %} + {%- endfor %} + {%- else %} + {%- for dep in roles %} - {{dep.name}}Deployment_Step{{step -1}} - {% endfor %} - {% endif %} + {%- endfor %} + {%- endif %} properties: name: {{role.name}}Deployment_Step{{step}} servers: {get_param: [servers, {{role.name}}]} @@ -74,9 +73,9 @@ resources: # after all the previous deployment steps. {{role.name}}ExtraConfigPost: depends_on: - {% for dep in roles %} + {%- for dep in roles %} - {{dep.name}}Deployment_Step5 - {% endfor %} + {%- endfor %} type: OS::TripleO::NodeExtraConfigPost properties: servers: {get_param: [servers, {{role.name}}]} @@ -87,9 +86,9 @@ resources: {{role.name}}PostConfig: type: OS::TripleO::Tasks::{{role.name}}PostConfig depends_on: - {% for dep in roles %} + {%- for dep in roles %} - {{dep.name}}ExtraConfigPost - {% endfor %} + {%- endfor %} properties: servers: {get_param: servers} input_values: @@ -104,16 +103,16 @@ resources: type: OS::Mistral::Workflow condition: WorkflowTasks_Step{{step}}_Enabled depends_on: - {% if step == 1 %} - {% for dep in roles %} + {%- if step == 1 %} + {%- for dep in roles %} - {{dep.name}}PreConfig - {{dep.name}}ArtifactsDeploy - {% endfor %} - {% else %} - {% for dep in roles %} + {%- endfor %} + {%- else %} + {%- for dep in roles %} - {{dep.name}}Deployment_Step{{step -1}} - {% endfor %} - {% endif %} + {%- endfor %} + {%- endif %} properties: name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflowtasks", "step{{step}}"]]} type: direct @@ -121,9 +120,9 @@ resources: yaql: expression: $.data.where($ != '').select($.get('step{{step}}')).where($ != null).flatten() data: - {% for role in roles %} + {%- for role in roles %} - get_param: [role_data, {{role.name}}, service_workflow_tasks] - {% endfor %} + {%- endfor %} WorkflowTasks_Step{{step}}_Execution: type: OS::Mistral::ExternalResource @@ -136,11 +135,21 @@ resources: params: env: service_ips: { get_param: ctlplane_service_ips } + role_merged_configs: + {%- for r in roles %} + {{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]} + {%- endfor %} + evaluate_env: false UPDATE: workflow: { get_resource: WorkflowTasks_Step{{step}} } params: env: service_ips: { get_param: ctlplane_service_ips } + role_merged_configs: + {%- for r in roles %} + {{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]} + {%- endfor %} + evaluate_env: false always_update: true {% endfor %} # END service_workflow_tasks handling |