48 lines
1.1 KiB
Django/Jinja
48 lines
1.1 KiB
Django/Jinja
{% for rack in data.baremetal %}
|
|
{% for host in rack.hosts %}
|
|
{% if host.type != 'genesis' %}
|
|
---
|
|
schema: 'drydock/BaremetalNode/v1'
|
|
metadata:
|
|
schema: 'metadata/Document/v1'
|
|
name: {{ host.name }}
|
|
layeringDefinition:
|
|
abstract: false
|
|
layer: site
|
|
storagePolicy: cleartext
|
|
data:
|
|
{% if host.host_profile == 'cp' %}
|
|
{% if loop.index - 1 < 4 %}
|
|
host_profile: nc-{{ host.host_profile }}-primary
|
|
{% else %}
|
|
host_profile: nc-{{ host.host_profile }}-secondary
|
|
{% endif %}
|
|
{% else %}
|
|
host_profile: nc-{{ host.host_profile }}
|
|
{% endif %}
|
|
addressing:
|
|
- network: oob
|
|
address: {{ host.ip.oob }}
|
|
- network: oam
|
|
address: {{ host.ip.oam }}
|
|
- network: pxe
|
|
address: {{ host.ip.pxe }}
|
|
- network: storage
|
|
address: {{ host.ip.storage }}
|
|
- network: calico
|
|
address: {{ host.ip.calico }}
|
|
- network: overlay
|
|
address: {{ host.ip.overlay }}
|
|
metadata:
|
|
rack: {{ rack.name }}
|
|
tags:
|
|
{% if host.type == 'compute' %}
|
|
- 'workers'
|
|
{% else %}
|
|
- 'masters'
|
|
{% endif %}
|
|
...
|
|
{% endif %}
|
|
{%endfor%}
|
|
{%endfor%}
|