Merge "Stop also openstack-swift-object-expirer when upgrading swift services"
[apex-tripleo-heat-templates.git] / extraconfig / post_deploy / example_run_on_update.yaml
1 heat_template_version: pike
2
3 description: >
4   Example extra config for post-deployment, this re-runs every update
5
6 # Note extra parameters can be defined, then passed data via the
7 # environment parameter_defaults, without modifying the parent template
8 parameters:
9   servers:
10     type: json
11   # This is provided via parameter_defaults from tripleoclient
12   # it changes to a new timestamp every update, so we can use it to
13   # trigger the deployment to run even though it and the config are
14   # otherwise unchanged
15   DeployIdentifier:
16     type: string
17     default: ''
18     description: >
19       Setting this to a unique value will re-run any deployment tasks which perform configuration on a Heat stack-update.
20
21 resources:
22
23   ExtraConfig:
24     type: OS::Heat::SoftwareConfig
25     properties:
26       group: script
27       inputs:
28         - name: deploy_identifier
29       config: |
30         #!/bin/sh
31         echo "extra_update $deploy_identifier" >> /root/extra_update
32
33   ExtraDeployments:
34     type: OS::Heat::SoftwareDeployments
35     properties:
36       name: ExtraDeployments
37       servers:  {get_param: servers}
38       config: {get_resource: ExtraConfig}
39       # Do this on CREATE/UPDATE (which is actually the default)
40       actions: ['CREATE', 'UPDATE']
41       input_values:
42         deploy_identifier: {get_param: DeployIdentifier}