Merge "Fix distinguishing between stack-create and stack-update"
[apex-tripleo-heat-templates.git] / puppet / compute-post.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   OpenStack compute node post deployment for Puppet.
5
6 parameters:
7   ConfigDebug:
8     default: false
9     description: Whether to run config management (e.g. Puppet) in debug mode.
10     type: boolean
11   servers:
12     type: json
13   NodeConfigIdentifiers:
14      type: json
15      description: Value which changes if the node configuration may need to be re-applied
16
17
18 resources:
19
20   ComputeArtifactsConfig:
21     type: deploy-artifacts.yaml
22
23   ComputeArtifactsDeploy:
24     type: OS::Heat::StructuredDeployments
25     properties:
26       servers:  {get_param: servers}
27       config: {get_resource: ComputeArtifactsConfig}
28       input_values:
29         update_identifier: {get_param: NodeConfigIdentifiers}
30
31   ComputePuppetConfig:
32     type: OS::Heat::SoftwareConfig
33     properties:
34       group: puppet
35       options:
36         enable_debug: {get_param: ConfigDebug}
37       outputs:
38       - name: result
39       config:
40         get_file: manifests/overcloud_compute.pp
41
42   ComputePuppetDeployment:
43     type: OS::Heat::StructuredDeployments
44     depends_on: ComputeArtifactsDeploy
45     properties:
46       name: ComputePuppetDeployment
47       servers:  {get_param: servers}
48       config: {get_resource: ComputePuppetConfig}
49       input_values:
50         update_identifier: {get_param: NodeConfigIdentifiers}
51
52   # Note, this should come last, so use depends_on to ensure
53   # this is created after any other resources.
54   ExtraConfig:
55     depends_on: ComputePuppetDeployment
56     type: OS::TripleO::NodeExtraConfigPost
57     properties:
58         servers: {get_param: servers}
59