4b5a0ce0e47f09f9d978ad145476bcc6b5a87b82
[joid.git] / ci / config_tpl / maas_tpl / maas-nodes.yaml
1 {% for node in lab.racks[0].nodes %}
2 {% if node.architecture=='x86_64' %}
3     - architecture: amd64/generic
4 {% endif %}
5       interfaces:
6 {% for nic in node.nics %}
7       - mac_address: {{ nic.mac[0] }}
8         mode: auto
9         name: {{ nic.ifname }}
10 {% endfor %}
11       mac_addresses:
12 {% for nic in node.nics %}
13       - {{ nic.mac[0] }}
14 {% endfor %}
15       name: {{ node.name }}
16       power:
17 {% if node.power.type=='ipmi' %}
18         address: {{ node.power.address }}
19         driver: LAN_2_0
20         pass: {{ node.power.pass }}
21         type: ipmi
22         user: {{ node.power.user }}
23 {% elif node.power.type=='wakeonlan' %}
24         type: etherwake
25         mac_address: {{ node.power.mac_address }}
26 {% endif %}
27       tags: {{ ' '.join(node.roles) }}
28 {% endfor %}