-
Notifications
You must be signed in to change notification settings - Fork 0
/
preseed.cfg.j2
108 lines (104 loc) · 3.76 KB
/
preseed.cfg.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#_preseed_V1
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string C.UTF-8
d-i keyboard-configuration/xkb-keymap select us
{% if for_vms %}
d-i netcfg/choose_interface select auto
{% endif %}
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i passwd/root-login boolean false
d-i passwd/user-fullname string Red Hat Ansible
d-i passwd/username string ansible
d-i passwd/user-password-crypted password {{ encrypted_password }}
d-i clock-setup/utc boolean true
d-i time/zone string UTC
d-i clock-setup/ntp boolean true
{% if for_vms %}
d-i partman-auto/disk string /dev/vda
{% endif %}
d-i partman-auto/method string {{ 'crypto' if encrypt_disks else 'regular' }}
{% if encrypt_disks %}
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string vg1
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-crypto/passphrase password {{ encryption_passphrase }}
d-i partman-crypto/passphrase-again password {{ encryption_passphrase }}
d-i partman-auto-crypto/erase_disks boolean false
d-i partman-auto/expert_recipe string \
crypto :: \
1 1 1 free \
$iflabel{ gpt } $reusemethod{ } \
method{ biosgrub } \
. \
512 512 512 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
2048 2048 2048 linux-swap \
$lvmok{ } lv_name{ swap } \
in_vg { vg1 } method{ swap } \
format{ } \
. \
{# -1 indicates unlimited partition size #}
10240 10240 -1 ext4 \
$lvmok{ } lv_name{ root } \
in_vg { vg1 } method{ format } \
format{ } use_filesystem{ } \
filesystem{ ext4 } mountpoint{ / } \
.
{% else %}
d-i partman-basicfilesystems/no_swap boolean false
d-i partman-auto/expert_recipe string \
regular :: \
1 1 1 free \
$iflabel{ gpt } $reusemethod{ } \
method{ biosgrub } \
. \
10240 10240 -1 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
{% endif %}
d-i partman-partitioning/choose_label select gpt
d-i partman-partitioning/default_label string gpt
d-i partman-md/confirm boolean true
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
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
tasksel tasksel/first multiselect standard, ssh-server
d-i pkgsel/include string \
python3\
sudo
popularity-contest popularity-contest/participate boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
{% if for_vms %}
d-i grub-installer/bootdev string default
{% else %}
d-i grub-installer/bootdev string /dev/disk/by-id/{{ disk_id | default('') }}
{% endif %}
d-i finish-install/reboot_in_progress note
d-i preseed/early_command string \
printf "%s\n" "$(debconf-get preseed/url)" > "/var/run/preseed.last_location";
{% if not for_vms %}
d-i partman/early_command string debconf-set partman-auto/disk "$(readlink -f "/dev/disk/by-id/{{ disk_id | default('') }}")"
{% endif %}
d-i preseed/late_command string \
preseed_fetch /scripts/late-commands /target/tmp/late-commands; \
preseed_fetch /authorized_keys /target/tmp/authorized_keys; \
in-target /bin/sh /tmp/late-commands;