aboutsummaryrefslogtreecommitdiffstats
path: root/roles/pxe_server/templates/grub/grub.cfg.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/pxe_server/templates/grub/grub.cfg.j2')
-rw-r--r--roles/pxe_server/templates/grub/grub.cfg.j222
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/pxe_server/templates/grub/grub.cfg.j2 b/roles/pxe_server/templates/grub/grub.cfg.j2
new file mode 100644
index 0000000..ae2d7cb
--- /dev/null
+++ b/roles/pxe_server/templates/grub/grub.cfg.j2
@@ -0,0 +1,22 @@
+set timeout=-1
+
+if [ "$grub_cpu" = "x86_64" -a "$grub_platform" = "efi" ]; then
+ set linux=linuxefi
+ set initrd=initrdefi
+ export linux
+ export initrd
+fi
+
+{% for image in pxe_images %}
+if [ "$grub_cpu" = "{{ image.arch }}" ]; then
+ menuentry "{{ image.description }} {{ image.version }}" {
+ configfile "$prefix/{{ image.name }}-{{ image.version }}-{{image.arch }}.cfg"
+ }
+
+ {% for kickstart in image.kickstart | default([]) %}
+ menuentry "{{ image.description }} {{ image.version }}: {{ kickstart.description }}" {
+ configfile "$prefix/{{ image.name }}-{{ image.version }}-{{image.arch }}-{{ kickstart.name | splitext | first }}.cfg"
+ }
+ {% endfor %}
+fi
+{% endfor %}