Merge "Add release notes for the HA-by-default change"
[apex-tripleo-heat-templates.git] / puppet / upgrade_config.yaml
1 heat_template_version: ocata
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   SkipUpgradeConfigTags:
15     type: comma_delimited_list
16     description: Ansible tags to skip during upgrade, e.g validation skips pre-upgrade validations
17     default: []
18
19 resources:
20
21   AnsibleConfig:
22     type: OS::Heat::Value
23     properties:
24       value:
25         str_replace:
26           template: CONFIG
27           params:
28             CONFIG:
29               - hosts: localhost
30                 connection: local
31                 tasks: {get_param: UpgradeStepConfig}
32
33   AnsibleUpgradeConfigImpl:
34     type: OS::Heat::SoftwareConfig
35     properties:
36       group: ansible
37       options:
38         skip_tags:
39           list_join:
40             - ","
41             - {get_param: SkipUpgradeConfigTags}
42         tags:
43           str_replace:
44             template: "common,stepSTEP"
45             params:
46               STEP: {get_param: step}
47         modulepath: /usr/share/ansible-modules
48       inputs:
49       - name: role
50       config: {get_attr: [AnsibleConfig, value]}
51
52 outputs:
53   OS::stack_id:
54     description: The software config which runs ansible with tags
55     value: {get_resource: AnsibleUpgradeConfigImpl}
56   upgrade_config:
57     description:  The configuration file used for upgrade
58     value: {get_attr: [AnsibleConfig, value]}