summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu/usb/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/ubuntu/usb/templates')
-rw-r--r--roles/installer/ubuntu/usb/templates/grub.cfg.j222
-rw-r--r--roles/installer/ubuntu/usb/templates/isolinux.cfg.j225
2 files changed, 47 insertions, 0 deletions
diff --git a/roles/installer/ubuntu/usb/templates/grub.cfg.j2 b/roles/installer/ubuntu/usb/templates/grub.cfg.j2
new file mode 100644
index 00000000..1f97113a
--- /dev/null
+++ b/roles/installer/ubuntu/usb/templates/grub.cfg.j2
@@ -0,0 +1,22 @@
+if loadfont $prefix/font.pf2 ; then
+ set gfxmode=auto
+ insmod efi_gop
+ insmod efi_uga
+ insmod gfxterm
+ terminal_output gfxterm
+fi
+
+set menu_color_normal=white/black
+set menu_color_highlight=black/light-gray
+{% if (ansible_play_hosts_all | length) == 1 %}
+set timeout=10
+set default=0
+{% endif %}
+{% for host in ansible_play_hosts_all %}
+
+menuentry "automated installer for {{ host }}" {
+ set gfxpayload=keep
+ linux /casper/vmlinuz quiet nopersistent autoinstall "ds=nocloud;s=/cdrom/autoinstall/{{ host }}/" {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ initrd /casper/initrd
+}
+{% endfor %}
diff --git a/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2 b/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2
new file mode 100644
index 00000000..8360c057
--- /dev/null
+++ b/roles/installer/ubuntu/usb/templates/isolinux.cfg.j2
@@ -0,0 +1,25 @@
+{% if (ansible_play_hosts_all | length) == 1 %}
+DEFAULT {{ inventory_hostname }}
+TIMEOUT 100
+PROMPT 1
+SAY *****************************************
+SAY **
+SAY ** Distro: {{ install_distro }}
+SAY ** Codename: {{ install_codename }}
+SAY **
+SAY ** will be booting automated installer for {{ inventory_hostname }} in 10s ...
+SAY **
+{% else %}
+DEFAULT menu.c32
+TIMEOUT 0
+PROMPT 0
+MENU TITLE {{ install_distro }} / {{ install_codename }}
+{% endif %}
+{% for host in ansible_play_hosts_all %}
+
+LABEL {{ host }}
+ MENU LABEL automatic installer for {{ host }}
+ KERNEL /casper/vmlinuz
+ INITRD /casper/initrd
+ APPEND quiet nopersistent autoinstall ds=nocloud;s=/cdrom/autoinstall/{{ host }}/ {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+{% endfor %}