tripleo-common/tripleo_common/templates/group_var_server.j2
James Slagle 381fc8c4fe Config download support for all deployments
Presently, "openstack overcloud config download" only supports the
OS::HeatSoftwareDeploymentGroup (plural) resources from
deploy-steps.yaml.

This patch adds support to the command to also pull the deployment
resources for each individual server from the OS::Heat::Value resources
called "TripleODeployment", as well as other SoftwareDeploymentGroup
resources not from deploy-steps.j2. See the Depends-On
tripleo-heat-templates patch for how these resources are mapped.

These deployments are applied by additional plays in the generated
playbooks. Instead of having to reimplement each deployment in a native
group:ansible, the ansible tasks just trigger the deployments by calling
55-heat-config remotely with the rendered json deployment data for
whatever deployment is being applied.

This method saves us from having to migrate all these resources to
native ansible (and requring all end users to do so).

Also included is a helper script called tripleo-config-download to run
the config download outside of Mistral.

implements: blueprint ansible-config-download
Change-Id: I7d7f6b831b8566390d8f747fb6f45e879b0392ba
Depends-On: Ic2af634403b1ab2924c383035f770453f39a2cd5
2017-10-17 13:59:53 -04:00

33 lines
983 B
Django/Jinja

deploy_server_id: {{ server_id }}
{% for deployment in deployments %}
{{ deployment.get('deployment_name') }}:
{% if deployment.get('scalar') %}
config: |
{% else %}
config:
{% endif %}
{{ deployment.get('config') | string | indent(4, true) }}
creation_time: "{{ deployment.get('creation_time') }}"
deployment_name: {{ deployment.get('deployment_name') }}
group: {{ deployment.get('group') }}
id: {{ deployment.get('id') }}
inputs:
{% for input in deployment.get('inputs') %}
- name: {{ input.get('name') }}
description: {{ input.get('description') }}
type: {{ input.get('type') }}
value: |-
{{ input.get('value') | string | indent(8, true) }}
{% endfor %}
name: {{ deployment.get('name') }}
options: {{ deployment.get('options') }}
outputs:
{% for output in deployment.get('outputs') %}
- name: {{ output.get('name') }}
description: {{ output.get('description') }}
type: {{ output.get('type') }}
{% endfor %}
{% endfor %}