X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tools%2Fj2%2Fserverrc.j2;h=bb7686b554e5a1a00bc665cfc5771e8b55592c70;hb=fbb206730195c6f03ded7658d08f1ef708ebf88b;hp=0356fd396bb72d5ce34285353714fb5dbf24b90c;hpb=3395a537e26721ec33a80f66686ca932f9328722;p=yaml_builds.git diff --git a/tools/j2/serverrc.j2 b/tools/j2/serverrc.j2 index 0356fd3..bb7686b 100644 --- a/tools/j2/serverrc.j2 +++ b/tools/j2/serverrc.j2 @@ -33,16 +33,16 @@ 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}}