update to debian 11 and name .iso by hostname-variable

This commit is contained in:
Alexander Gabriel 2021-09-25 22:28:16 +02:00
parent f3c00a59e2
commit e25f888523
2 changed files with 49 additions and 28 deletions

View File

@ -14,8 +14,8 @@
- name: Download ISO Image - name: Download ISO Image
get_url: get_url:
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.9.0-amd64-netinst.iso" url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.0.0-amd64-netinst.iso"
dest: "/opt/ansiblepackages/debianunattended/debian-10.9.0-amd64-netinst.iso" dest: "/opt/ansiblepackages/debianunattended/debian-11.0.0-amd64-netinst.iso"
- name: delete old stuff - name: delete old stuff
file: file:
@ -23,7 +23,7 @@
state: absent state: absent
- name: extract ISO Image - name: extract ISO Image
command: xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-10.9.0-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/isofiles/ command: xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-11.0.0-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/isofiles/
args: args:
creates: /opt/ansiblepackages/debianunattended/isofiles/install.amd/initrd.gz creates: /opt/ansiblepackages/debianunattended/isofiles/install.amd/initrd.gz
@ -99,4 +99,4 @@
mode: +w mode: +w
- name: genisoimage - name: genisoimage
command: genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/ansiblepackages/debianunattended/debian-10.9.0-amd64-netinst-unattended.iso /opt/ansiblepackages/debianunattended/isofiles command: genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/ansiblepackages/debianunattended/debian-11.0.0-amd64-netinst-unattended-{{ debianunattended_hostname }}.iso /opt/ansiblepackages/debianunattended/isofiles

View File

@ -1,17 +1,18 @@
#### Contents of the preconfiguration file (for buster) #_preseed_V1
#### Contents of the preconfiguration file (for bullseye)
### Localization ### Localization
# Preseeding only locale sets language, country and locale. # Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility. # The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string {{ debianunattended_debian_installer_language }} d-i debian-installer/language string {{ debianunattended_debian_installer_language | default('de') }}
#d-i debian-installer/country string {{ debianunattended_debian_installer_country }} d-i debian-installer/country string {{ debianunattended_debian_installer_country | default('DE') }}
#d-i debian-installer/locale string {{ debianunattended_debian_installer_locale }} d-i debian-installer/locale string {{ debianunattended_debian_installer_locale | default('de_DE.UTF8') }}
# Optionally specify additional locales to be generated. # Optionally specify additional locales to be generated.
#d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8
# Keyboard selection. # Keyboard selection.
d-i keyboard-configuration/xkb-keymap select {{ debianunattended_keyboard_configuration_xkb_keymap }} d-i keyboard-configuration/xkb-keymap select {{ debianunattended_keyboard_configuration_xkb_keymap | default('de') }}
# d-i keyboard-configuration/toggle select No toggling # d-i keyboard-configuration/toggle select No toggling
### Network configuration ### Network configuration
@ -217,6 +218,20 @@ d-i partman-auto/choose_recipe select atomic
# system labels, volume group names and which physical devices to include # system labels, volume group names and which physical devices to include
# in a volume group. # in a volume group.
## Partitioning for EFI
# If your system needs an EFI partition you could add something like
# this to the recipe above, as the first element in the recipe:
# 538 538 1075 free \
# $iflabel{ gpt } \
# $reusemethod{ } \
# method{ efi } \
# format{ } \
# . \
#
# The fragment above is for the amd64 architecture; the details may be
# different on other architectures. The 'partman-auto' package in the
# D-I source repository may have an example you can follow.
# This makes partman automatically partition without confirmation, provided # This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above. # that you told it what to do using one of the methods above.
d-i partman-partitioning/confirm_write_new_label boolean true d-i partman-partitioning/confirm_write_new_label boolean true
@ -224,6 +239,12 @@ d-i partman/choose_partition select finish
d-i partman/confirm boolean true d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true d-i partman/confirm_nooverwrite boolean true
# Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
#d-i partman-efi/non_efi_system boolean true
# Ensure the partition table is GPT - this is required for EFI
#d-i partman-partitioning/choose_label string gpt
#d-i partman-partitioning/default_label string gpt
# When disk encryption is enabled, skip wiping the partitions beforehand. # When disk encryption is enabled, skip wiping the partitions beforehand.
#d-i partman-auto-crypto/erase_disks boolean false #d-i partman-auto-crypto/erase_disks boolean false
@ -312,8 +333,12 @@ d-i partman/confirm_nooverwrite boolean true
#d-i apt-setup/local0/source boolean true #d-i apt-setup/local0/source boolean true
# URL to the public key of the local repository; you must provide a key or # URL to the public key of the local repository; you must provide a key or
# apt will complain about the unauthenticated repository and so the # apt will complain about the unauthenticated repository and so the
# sources.list line will be left commented out # sources.list line will be left commented out.
#d-i apt-setup/local0/key string http://local.server/key #d-i apt-setup/local0/key string http://local.server/key
# If the provided key file ends in ".asc" the key file needs to be an
# ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the
# "GPG key public keyring" format, the "keybox database" format is
# currently not supported.
# By default the installer requires that repositories be authenticated # By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that # using a known gpg key. This setting can be used to disable that
@ -337,34 +362,29 @@ d-i pkgsel/include string openssh-server build-essential {{ debianunattended_add
# Some versions of the installer can report back on what software you have # Some versions of the installer can report back on what software you have
# installed, and what software you use. The default is not to report back, # installed, and what software you use. The default is not to report back,
# but sending reports helps the project determine what software is most # but sending reports helps the project determine what software is most
# popular and include it on CDs. # popular and should be included on the first CD/DVD.
popularity-contest popularity-contest/participate boolean false popularity-contest popularity-contest/participate boolean false
### Boot loader installation ### Boot loader installation
# Grub is the default boot loader (for x86). If you want lilo installed # Grub is the boot loader (for x86).
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the UEFI
# This is fairly safe to set, it makes grub install automatically to the MBR # partition/boot record if no other operating system is detected on the machine.
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other # This one makes grub-installer install to the UEFI partition/boot record, if
# OS, which is less safe as it might not be able to boot that other OS. # it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the MBR can not be # Due notably to potential USB sticks, the location of the primary drive can
# determined safely in general, so this needs to be specified: # not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda #d-i grub-installer/bootdev string /dev/sda
# To install to the first device (assuming it is not a USB stick): # To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default #d-i grub-installer/bootdev string default
# Alternatively, if you want to install to a location other than the mbr, # Alternatively, if you want to install to a location other than the UEFI
# uncomment and edit these lines: # parition/boot record, uncomment and edit these lines:
#d-i grub-installer/only_debian boolean false #d-i grub-installer/only_debian boolean false
#d-i grub-installer/with_other_os boolean false #d-i grub-installer/with_other_os boolean false
#d-i grub-installer/bootdev string (hd0,1) #d-i grub-installer/bootdev string (hd0,1)
@ -440,6 +460,7 @@ d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false d-i apt-setup/cdrom/set-failed boolean false
apt-cdrom-setup apt-setup/cdrom/set-next boolean false apt-cdrom-setup apt-setup/cdrom/set-next boolean false
apt-cdrom-setup apt-setup/cdrom/set-failed boolean true apt-cdrom-setup apt-setup/cdrom/set-failed boolean true
d-i pkgsel/update-policy select none
{% if debianunattended_staticip_ipaddress is defined %} {% if debianunattended_staticip_ipaddress is defined %}
#static IPv4 address? #static IPv4 address?