SRV_OOB_PWD={{yaml.ipmi_admin.password}}
# mac address of server to be used during the build - not required for Dell servers
-{% if 'genesis.mac_address' in yaml %}
+{% if 'mac_address' in yaml.genesis %}
SRV_MAC={{yaml.genesis.mac_address}}
{% endif %}
# the boot device is the device name on which the OS will be loaded
-SRV_BOOT_DEVICE={{yaml.disks[0].name}}
-SRV_CEPH_DEVICE={{yaml.disks[1].name}}
+SRV_BOOT_DEVICE={{yaml.hardware.device_aliases|selectattr('key', 'equalto', 'bootdisk') | map(attribute='name')|first|replace("/dev/","")}}
+SRV_CEPH_DEVICE={{yaml.hardware.device_aliases|selectattr('key', 'equalto', 'cephjournal1') | map(attribute='name')|first|replace("/dev/","")}}
# ipxe script to use - based on the os version and kernel to install
# valid options are script-hwe-16.04.6-amd64.ipxe or script-16.04.6-amd64.ipxe
SRV_BLD_SCRIPT=script-hwe-16.04.6-amd64.ipxe
# template xml file to set bios and raid configuration settings
-SRV_BIOS_TEMPLATE={% if 'bios_template' in yaml.genesis %}{{yaml.genesis.bios_template}}
- {% else %}{{yaml.hardware.bios_template}}
+SRV_BIOS_TEMPLATE={% if 'bios_template' in yaml.genesis %}{{yaml.genesis.bios_template|default("",true)}}
+ {% else %}{{yaml.hardware.bios_template|default("",true)}}
{% endif %}
SRV_BOOT_TEMPLATE={% if 'boot_template' in yaml.genesis %}{{yaml.genesis.boot_template}}
{% else %}{{yaml.hardware.boot_template}}
# tempalte to run to configure OS after first boot
# current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
SRV_FIRSTBOOT_TEMPLATE=firstboot-genesis.sh.template
+SRV_KERNEL_PARAMS="{% if 'platform' in yaml %}{% for key, value in yaml.platform.kernel_params.items() %}{{key}}={{value}}{{ ' ' if not loop.last else '' }}{% endfor %}{% endif %}"
# VLAN to use during build and for final network configuration
SRV_VLAN={{yaml.networks.host.vlan}}
SRV_CALICO_VLAN={{yaml.networks.ksn.vlan}}
SRV_NEUTRON_VLAN={{yaml.networks.neutron.vlan}}
SRV_PXE_INF={{yaml.networks.pxe.interface}}
+SRV_VXLAN_INF={% if 'vxlan' in yaml.networks %}{{yaml.networks.vxlan.interface}}{% endif %}
# basic network information for dhcp config and final server network settings
SRV_MTU=9000
SRV_CALICO_IP={{yaml.genesis.ksn}}
SRV_NEUTRON_IP={{yaml.genesis.neutron}}
SRV_PXE_IP={{yaml.genesis.pxe}}
-SRV_SUBNET={{yaml.networks.host.subnet}}
-SRV_NETMASK={{yaml.networks.host.netmask}}
+SRV_VXLAN_IP={% if 'vxlan' in yaml.networks %}{{yaml.genesis.vxlan}}{% endif %}
+
+SRV_SUBNET={{yaml.networks.host.cidr | cidr_subnet}}
+SRV_NETMASK={{yaml.networks.host.cidr | cidr_netmask}}
SRV_GATEWAY={{yaml.networks.host.routes.gateway}}
SRV_DNS="{% if 'dns' in yaml.networks.host %}{{yaml.networks.host.dns.servers}}{% else %}{{yaml.dns.upstream_servers|join(' ')}}{% endif %}"
SRV_DOMAIN={% if 'dns' in yaml.networks.pxe and 'domain' in yaml.networks.pxe.dns %}{{yaml.networks.pxe.dns.domain}}
{% for slave in yaml.networks.slaves %}
SRV_SLAVE{{loop.index}}={{slave.name}}
{% endfor %}
-