769e55db7836f1fcce2a720471d134be6cdf8185
[pharos.git] / config / installers / fuel / pod_config.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 ---
10 {%- if nm.cluster.has_baremetal_nodes %}
11 parameters:
12   maas:
13     region:
14       machines:
15 {%- for node in conf.nodes %}
16 {%- if node.node.type == 'baremetal' %}
17
18 {%- if loop.index > nm.cmp001.idx %}
19         {{ 'cmp%03d' | format(loop.index - nm.cmp001.idx) }}:
20 {%- else %}
21         {{ 'kvm%02d' | format(loop.index) }}:
22 {%- endif %}
23           interface:
24             mac: {{ node.interfaces[nm.idx_admin].mac_address }}
25           power_parameters:
26             power_address: {{ node.remote_management.address.rsplit('/')[0] }}
27             power_password: {{ node.remote_management.pass }}
28             power_type: {{ node.remote_management.type }}
29             power_user: {{ node.remote_management.user }}
30           architecture: {{ node.node.arch | dpkg_arch }}/generic
31           distro_series: xenial
32           hwe_kernel: ${_param:hwe_kernel}
33
34 {%- endif %}
35 {%- endfor %}
36 {%- endif %}