Merge "[patch] MaaS: mcp.rsa.pub to auth keys via pillar"
[fuel.git] / mcp / reclass / classes / cluster / mcp-pike-common-ha / infra / maas_pdf.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 ---
9 parameters:
10   maas:
11     region:
12       sshprefs:
13         - '{{ conf.MAAS_SSH_KEY }}'
14       machines:
15       {%- set pxe_interface = conf.idf.net_config.admin.interface %}
16       {#- We only support exactly 5 nodes for now, hardcoded order #}
17       {%- set node_roles = ['kvm01', 'kvm02', 'kvm03', 'cmp001', 'cmp002'] %}
18       {%- for node in conf.nodes %}
19       {%- if node.node.type == 'baremetal' %}
20         {{ node_roles[loop.index0] }}:
21           interface:
22             mac: {{ node.interfaces[pxe_interface].mac_address }}
23           power_parameters:
24             power_address: {{ node.remote_management.address.rsplit('/')[0] }}
25             power_password: {{ node.remote_management.pass }}
26             power_type: {{ node.remote_management.type }}
27             power_user: {{ node.remote_management.user }}
28           architecture: {{ node.node.arch | dpkg_arch }}/generic
29           distro_series: xenial
30           hwe_kernel: ${_param:hwe_kernel}
31       {%- endif %}
32       {%- endfor %}