Carlos Camacho 927495fe3d Change template names to queens
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
2017-11-23 10:15:32 +01:00

44 lines
1.2 KiB
YAML

heat_template_version: queens
parameters:
ContrailRepo:
type: string
default: ''
resources:
userdata:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: EnableContrailRepoConfig}
EnableContrailRepoConfig:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template: |
#!/bin/bash
contrail_repo=$contrail_repo
if [[ ${contrail_repo} ]]; then
cat <<EOF > /etc/yum.repos.d/contrail.repo
[Contrail]
name=Contrail Repo
baseurl=${contrail_repo}
enabled=1
gpgcheck=0
protect=1
metadata_expire=30
EOF
fi
params:
$contrail_repo: {get_param: ContrailRepo}
outputs:
# This means get_resource from the parent template will get the userdata, see:
# http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
# Note this is new-for-kilo, an alternative is returning a value then using
# get_attr in the parent template instead.
OS::stack_id:
value: {get_resource: userdata}