mirror of
https://github.com/BluemediaGER/homelab.git
synced 2024-11-14 16:35:29 +01:00
78 lines
3.2 KiB
Plaintext
78 lines
3.2 KiB
Plaintext
|
# For documentation see: https://www.debian.org/releases/stable/example-preseed.txt
|
||
|
|
||
|
# Set default locale and keyboard layout
|
||
|
d-i debian-installer/locale string {{ locale | default('en_US.UTF-8') }}
|
||
|
d-i keyboard-configuration/xkb-keymap select {{ keyboard_layout | default('de') }}
|
||
|
|
||
|
# Set network interface used by default
|
||
|
d-i netcfg/choose_interface select auto
|
||
|
|
||
|
# Static network config
|
||
|
d-i netcfg/disable_autoconfig boolean true
|
||
|
d-i netcfg/dhcp_failed note
|
||
|
d-i netcfg/dhcp_options select Configure network manually
|
||
|
|
||
|
d-i netcfg/get_ipaddress string {{ hostvars[item]['ansible_host'] }}
|
||
|
d-i netcfg/get_netmask string {{ netmask }}
|
||
|
d-i netcfg/get_gateway string {{ gateway }}
|
||
|
d-i netcfg/get_nameservers string {{ nameserver }}
|
||
|
d-i netcfg/confirm_static boolean true
|
||
|
|
||
|
# These values will be overwritten if set by dhcp, but the entries will get rid of the correscponding questions
|
||
|
d-i netcfg/get_hostname string {{ hostvars[item]['inventory_hostname'] | default('unassigned-hostname') }}
|
||
|
d-i netcfg/get_domain string {{ domain | default('unassigned-domain') }}
|
||
|
|
||
|
# Force hostname regarding of value set by dhcp
|
||
|
d-i netcfg/hostname string {{ hostvars[item]['inventory_hostname'] | default('unassigned-hostname') }}
|
||
|
|
||
|
# Load non-free firmware for hardware by default
|
||
|
d-i hw-detect/load_firmware boolean true
|
||
|
|
||
|
# Setup package mirrror
|
||
|
d-i mirror/protocol string {{ mirror_proto | default('http') }}
|
||
|
d-i mirror/country string manual
|
||
|
d-i mirror/http/hostname string {{ mirror | default('deb.debian.org') }}
|
||
|
d-i mirror/http/directory string {{ mirror_dir | default('/debian') }}
|
||
|
d-i mirror/http/proxy string {{ mirror_proxy | default('') }}
|
||
|
|
||
|
# Disable root user - normal user (see below) will have sudo permissions
|
||
|
d-i passwd/root-login boolean false
|
||
|
|
||
|
# Create new user
|
||
|
d-i passwd/user-fullname string {{ user_fullname | default('Debian User') }}
|
||
|
d-i passwd/username string {{ username | default('debian') }}
|
||
|
d-i passwd/user-password password {{ password | default('insecure') }}
|
||
|
d-i passwd/user-password-again password {{ password | default('insecure') }}
|
||
|
|
||
|
# Setup timezone and NTP server
|
||
|
d-i clock-setup/utc boolean true
|
||
|
d-i time/zone string {{ timezone | default('UTC') }}
|
||
|
d-i clock-setup/ntp-server string {{ ntp_server | default('de.pool.ntp.org') }}
|
||
|
|
||
|
# Autoformat disk
|
||
|
d-i partman-auto/disk string {{ hostvars[item]['disk'] | default('/dev/sda') }}
|
||
|
d-i partman-auto/method string regular
|
||
|
d-i partman-auto/choose_recipe select atomic
|
||
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
||
|
d-i partman/choose_partition select finish
|
||
|
d-i partman/confirm boolean true
|
||
|
d-i partman/confirm_nooverwrite boolean true
|
||
|
|
||
|
# Remove install cd sources from /etc/sources.list
|
||
|
d-i apt-setup/cdrom/set-first boolean false
|
||
|
d-i apt-setup/disable-cdrom-entries boolean true
|
||
|
|
||
|
# Install openssh-server and basic system tools
|
||
|
d-i pkgsel/run_tasksel boolean false
|
||
|
d-i pkgsel/include string openssh-server build-essential
|
||
|
d-i pkgsel/upgrade select safe-upgrade
|
||
|
|
||
|
# Disable package reporting
|
||
|
popularity-contest popularity-contest/participate boolean false
|
||
|
|
||
|
# Install grub to specified device
|
||
|
d-i grub-installer/only_debian boolean true
|
||
|
d-i grub-installer/bootdev string {{ hostvars[item]['disk'] | default('/dev/sda') }}
|
||
|
|
||
|
# Reboot to installed system without confirmation
|
||
|
d-i finish-install/reboot_in_progress note
|