c9991c2e31
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added a new template version for wallaby. This would allow us to use 2-argument variant of the ``if`` function that would allow for e.g. conditional definition of resource properties and help cleanup templates. If only two arguments are passed to ``if`` function, the entire enclosing item is removed when the condition is false. Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
29 lines
674 B
YAML
29 lines
674 B
YAML
heat_template_version: wallaby
|
|
|
|
description: >
|
|
Example extra config for post-deployment
|
|
|
|
# Note extra parameters can be defined, then passed data via the
|
|
# environment parameter_defaults, without modifying the parent template
|
|
parameters:
|
|
servers:
|
|
type: json
|
|
|
|
resources:
|
|
|
|
ExtraConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
config: |
|
|
#!/bin/sh
|
|
echo "extra" > /root/extra
|
|
|
|
ExtraDeployments:
|
|
type: OS::Heat::SoftwareDeploymentGroup
|
|
properties:
|
|
name: ExtraDeployments
|
|
servers: {get_param: servers}
|
|
config: {get_resource: ExtraConfig}
|
|
actions: ['CREATE'] # Only do this on CREATE
|