1 {% set lvars = { 'host_ip' : '192.168.122.1', 'pxe_network' : False} %}
2 {% for network in networks %}
3 {% if (not (network.forward_mode is defined and network.forward_mode == 'nat') and lvars['pxe_network'] == False) %}
4 {% if lvars.update({'pxe_network' : network.name}) %}{% endif %}
6 {% if network.address is defined and lvars['host_ip'] == '192.168.122.1' %}
7 {% if lvars.update({'host_ip' : network.address}) %}{% endif %}
12 {% for node in vm_nodes %}
14 "name": "{{ node.name|replace('_', '-') }}",
16 "resource_class": "baremetal",
18 "ipmi_username": "admin",
19 "ipmi_password": "password",
20 "ipmi_address": "{{ lvars['host_ip'] }}",
21 "ipmi_port": "{{ node.virtualbmc_port }}",
22 "deploy_kernel": "http://172.22.0.1/images/ironic-python-agent.kernel",
23 "deploy_ramdisk": "http://172.22.0.1/images/ironic-python-agent.initramfs"
26 "address": "{{ node_mac_map.get(node.name).get(lvars['pxe_network']) }}",
30 "local_gb": "{{ flavors[node.flavor].disk }}",
31 "cpu_arch": "{{ libvirt_arch }}"
34 {% if not loop.last %}