Merge "Initial support for composable upgrades with Heat+Ansible"
[apex-tripleo-heat-templates.git] / puppet / upgrade_config.yaml
1 heat_template_version: 2016-10-14
2 description: 'Upgrade for via ansible by applying a step related tag'
3
4 parameters:
5   UpgradeStepConfig:
6      type: json
7      description: Config (ansible yaml) that will be used to step through the deployment.
8      default: ''
9
10   step:
11     type: string
12     description: Step number of the upgrade
13
14 resources:
15
16   AnsibleConfig:
17     type: OS::Heat::Value
18     properties:
19       value:
20         str_replace:
21           template: CONFIG
22           params:
23             CONFIG:
24               - hosts: localhost
25                 connection: local
26                 tasks: {get_param: UpgradeStepConfig}
27
28   AnsibleUpgradeConfigImpl:
29     type: OS::Heat::SoftwareConfig
30     properties:
31       group: ansible
32       options:
33         tags:
34           str_replace:
35             template: "stepSTEP"
36             params:
37               STEP: {get_param: step}
38       inputs:
39       - name: role
40       config: {get_attr: [AnsibleConfig, value]}
41
42 outputs:
43   OS::stack_id:
44     description: The software config which runs ansible with tags
45     value: {get_resource: AnsibleUpgradeConfigImpl}
46   upgrade_config:
47     description:  The configuration file used for upgrade
48     value: {get_attr: [AnsibleConfig, value]}