diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-26 11:21:46 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-26 11:21:47 +0000 |
commit | 4c05db369cb44bc10fd3c6a131af5badcdfd351b (patch) | |
tree | 14de607f4f417b135c373430ce09aa913eb3b8e2 /extraconfig/all_nodes/contrail | |
parent | f1ff69d1a24414dc3da47b5e33e440210386d4dc (diff) | |
parent | aa5194f878bb0c9fb98891abd6005b1b252eff3e (diff) |
Merge "Contrail network realignement + DPDK enablement"
Diffstat (limited to 'extraconfig/all_nodes/contrail')
-rw-r--r-- | extraconfig/all_nodes/contrail/enable_contrail_repo.yaml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/extraconfig/all_nodes/contrail/enable_contrail_repo.yaml b/extraconfig/all_nodes/contrail/enable_contrail_repo.yaml new file mode 100644 index 00000000..51da6f65 --- /dev/null +++ b/extraconfig/all_nodes/contrail/enable_contrail_repo.yaml @@ -0,0 +1,43 @@ +heat_template_version: pike + +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} |