summaryrefslogtreecommitdiff
path: root/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/debian/preseed/templates/partman_early-command.sh.j2')
-rw-r--r--roles/installer/debian/preseed/templates/partman_early-command.sh.j212
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
index 9c720e92..f13290e4 100644
--- a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
+++ b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2
@@ -31,3 +31,15 @@ debconf-set grub-installer/bootdev "$disks"
## https://unix.stackexchange.com/questions/510445/install-grub-bootloader-dynamically-to-multiple-disks
. /usr/share/debconf/confmodule
db_fset grub-installer/bootdev seen true
+
+mkdir -p /lib/partman/not-enough-space.d/
+cat <<EOF > /lib/partman/not-enough-space.d/00-ansible
+#!/bin/sh
+
+. /usr/share/debconf/confmodule
+db_input critical partman-auto/autopartitioning_failed || true
+db_go || true
+
+exit 1
+EOF
+chmod +x /lib/partman/not-enough-space.d/00-ansible