927495fe3d
The new master branch should point now to queens instead of pike. So, HOT templates should specify that they might contain features for queens release [1] [1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#queens Change-Id: I7654d1c59db0c4508a9d7045f452612d22493004
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
heat_template_version: queens
|
|
description: 'Upgrade for via ansible by applying a step related tag'
|
|
|
|
parameters:
|
|
UpgradeStepConfig:
|
|
type: json
|
|
description: Config (ansible yaml) that will be used to step through the deployment.
|
|
default: ''
|
|
|
|
step:
|
|
type: string
|
|
description: Step number of the upgrade
|
|
|
|
SkipUpgradeConfigTags:
|
|
type: comma_delimited_list
|
|
description: Ansible tags to skip during upgrade, e.g validation skips pre-upgrade validations
|
|
default: []
|
|
|
|
resources:
|
|
|
|
AnsibleConfig:
|
|
type: OS::Heat::Value
|
|
properties:
|
|
value:
|
|
str_replace:
|
|
template: CONFIG
|
|
params:
|
|
CONFIG:
|
|
- hosts: localhost
|
|
connection: local
|
|
tasks: {get_param: UpgradeStepConfig}
|
|
|
|
AnsibleUpgradeConfigImpl:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: ansible
|
|
options:
|
|
skip_tags:
|
|
list_join:
|
|
- ","
|
|
- {get_param: SkipUpgradeConfigTags}
|
|
tags:
|
|
str_replace:
|
|
template: "common,stepSTEP"
|
|
params:
|
|
STEP: {get_param: step}
|
|
modulepath: /usr/share/ansible-modules
|
|
inputs:
|
|
- name: role
|
|
config: {get_attr: [AnsibleConfig, value]}
|
|
|
|
outputs:
|
|
OS::stack_id:
|
|
description: The software config which runs ansible with tags
|
|
value: {get_resource: AnsibleUpgradeConfigImpl}
|
|
upgrade_config:
|
|
description: The configuration file used for upgrade
|
|
value: {get_attr: [AnsibleConfig, value]}
|