tripleo-common/tripleo_common/templates/deployment.j2
James Slagle 6b7220639a Template each deployment file
By running each deployment file through the Ansible template module,
we're able to include ansible variables and jinja expressions in the
deployment file that will be resolved at config-download runtime.

This allows each deployment file to be more generic instead of having to
contain the hardcoded data directly out of Heat.

Change-Id: Iae9ccdf6fad2fabdce66650ee7b064f1ac9528e4
implements: blueprint reduce-deployment-resources
2019-05-30 19:47:59 -04:00

28 lines
898 B
Django/Jinja

{{ 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 %}