correct maas-nodes templates when node architecture is not defined
[joid.git] / ci / config_tpl / maas_tpl / maas-nodes.yaml
1 {% for node in lab.racks[0].nodes %}
2     - interfaces:
3 {% for nic in node.nics %}
4       - mac_address: {{ nic.mac[0] }}
5         mode: auto
6         name: {{ nic.ifname }}
7 {% endfor %}
8 {% if node.architecture=='x86_64' %}
9       architecture: amd64/generic
10 {% endif %}
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 %}