Compare commits
28
Commits
64cc52cdba
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59a3f5efaa | ||
|
|
e8b4bf8a3a | ||
|
|
be3ba1b6ef | ||
|
|
a73806dde2 | ||
|
|
8b5a165b34 | ||
|
|
1bade76655 | ||
|
|
23b94c361b | ||
|
|
6414b455d8 | ||
|
|
d580ace85a | ||
|
|
5604cff61e | ||
|
|
12b0ef4031 | ||
|
|
98613ff6e8 | ||
|
|
94548d06a8 | ||
|
|
651d5c1e05 | ||
|
|
ef62ba8c8a | ||
|
|
637672d648 | ||
|
|
1e1974189f | ||
|
|
69705bfdef | ||
|
|
29f0154e4a | ||
|
|
6796b0a07f | ||
|
|
14c3a2df71 | ||
|
|
f21b7f2a40 | ||
|
|
7eb70c653d | ||
|
|
1e2663bb42 | ||
|
|
b4a71873b8 | ||
|
|
80353518f2 | ||
|
|
bf59f8b1ef | ||
|
|
680e8c8269 |
No files matched your search
+21
-8
@@ -1,7 +1,19 @@
|
|||||||
---
|
---
|
||||||
|
- name: query current debian release info
|
||||||
|
uri:
|
||||||
|
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS"
|
||||||
|
return_content: true
|
||||||
|
delegate_to: localhost
|
||||||
|
run_once: true
|
||||||
|
register: debianunattended_sha256sums
|
||||||
|
|
||||||
|
- name: determine current debian version
|
||||||
|
set_fact:
|
||||||
|
debianunattended_debian_version: "{{ debianunattended_sha256sums.content | regex_search('debian-([0-9]+\\.[0-9]+\\.[0-9]+)-amd64-netinst\\.iso', '\\1') | first }}"
|
||||||
|
|
||||||
- name: check if iso exists
|
- name: check if iso exists
|
||||||
stat:
|
stat:
|
||||||
path: "{{ playbook_dir }}/debian-11.5.0-amd64-netinst-unattended-{{ inventory_hostname }}.iso"
|
path: "{{ playbook_dir }}/debian-{{ debianunattended_debian_version }}-amd64-netinst-unattended-{{ inventory_hostname }}.iso"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
register: iso_exists
|
register: iso_exists
|
||||||
|
|
||||||
@@ -10,13 +22,13 @@
|
|||||||
when: iso_exists.stat.exists
|
when: iso_exists.stat.exists
|
||||||
|
|
||||||
- name: install stuff
|
- name: install stuff
|
||||||
apt:
|
package:
|
||||||
name:
|
name:
|
||||||
- xorriso
|
- xorriso
|
||||||
- unzip
|
- unzip
|
||||||
- genisoimage
|
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
run_once: true
|
||||||
|
|
||||||
- name: create project directory
|
- name: create project directory
|
||||||
file:
|
file:
|
||||||
@@ -26,9 +38,10 @@
|
|||||||
|
|
||||||
- name: Download ISO Image
|
- name: Download ISO Image
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.5.0-amd64-netinst.iso"
|
url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso"
|
||||||
dest: "/opt/ansiblepackages/debianunattended/debian-11.5.0-amd64-netinst.iso"
|
dest: "/opt/ansiblepackages/debianunattended/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
run_once: true
|
||||||
|
|
||||||
- name: delete old stuff
|
- name: delete old stuff
|
||||||
file:
|
file:
|
||||||
@@ -37,7 +50,7 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: extract ISO Image
|
- name: extract ISO Image
|
||||||
command: "xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-11.5.0-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/"
|
command: "xorriso -osirrox on -indev /opt/ansiblepackages/debianunattended/debian-{{ debianunattended_debian_version }}-amd64-netinst.iso -extract / /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/"
|
||||||
args:
|
args:
|
||||||
creates: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/install.amd/initrd.gz"
|
creates: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/install.amd/initrd.gz"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@@ -101,7 +114,7 @@
|
|||||||
|
|
||||||
- name: copy authorized_keys file
|
- name: copy authorized_keys file
|
||||||
copy:
|
copy:
|
||||||
src: files/authorized_keys
|
src: files/ssh-keys.pub
|
||||||
dest: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/authorized_keys"
|
dest: "/opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles/authorized_keys"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
@@ -147,5 +160,5 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- 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 {{ playbook_dir }}/debian-11.5.0-amd64-netinst-unattended-{{ inventory_hostname }}.iso /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles"
|
command: "genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o {{ playbook_dir }}/debian-{{ debianunattended_debian_version }}-amd64-netinst-unattended-{{ inventory_hostname }}.iso /opt/ansiblepackages/debianunattended/{{ inventory_hostname }}/isofiles"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
+31
-26
@@ -1,8 +1,8 @@
|
|||||||
#_preseed_V1
|
#_preseed_V1
|
||||||
#### Contents of the preconfiguration file (for bullseye)
|
#### Contents of the preconfiguration file (for trixie)
|
||||||
### 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.UTF-8
|
||||||
|
|
||||||
# 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 | default('de') }}
|
d-i debian-installer/language string {{ debianunattended_debian_installer_language | default('de') }}
|
||||||
@@ -15,6 +15,15 @@ d-i debian-installer/locale string {{ debianunattended_debian_installer_locale
|
|||||||
d-i keyboard-configuration/xkb-keymap select {{ debianunattended_keyboard_configuration_xkb_keymap | default('de') }}
|
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
|
||||||
|
|
||||||
|
### Speech synthesis
|
||||||
|
# Which ALSA card to be used for software speech.
|
||||||
|
# Can be a number from 0, or an ID as seen in
|
||||||
|
# /sys/class/sound/card*/id
|
||||||
|
#d-i espeakup/card string 0
|
||||||
|
|
||||||
|
# Which espeak-ng voice to be used
|
||||||
|
#d-i espeakup/voice string en
|
||||||
|
|
||||||
### Network configuration
|
### Network configuration
|
||||||
# Disable network configuration entirely. This is useful for cdrom
|
# Disable network configuration entirely. This is useful for cdrom
|
||||||
# installations on non-networked devices where the network questions,
|
# installations on non-networked devices where the network questions,
|
||||||
@@ -80,6 +89,10 @@ d-i netcfg/wireless_wep string
|
|||||||
# The wacky dhcp hostname that some ISPs use as a password of sorts.
|
# The wacky dhcp hostname that some ISPs use as a password of sorts.
|
||||||
#d-i netcfg/dhcp_hostname string radish
|
#d-i netcfg/dhcp_hostname string radish
|
||||||
|
|
||||||
|
# If you want to completely disable firmware lookup (i.e. not use firmware
|
||||||
|
# files or packages that might be available on installation images):
|
||||||
|
#d-i hw-detect/firmware-lookup string never
|
||||||
|
|
||||||
# If non-free firmware is needed for the network or other hardware, you can
|
# If non-free firmware is needed for the network or other hardware, you can
|
||||||
# configure the installer to always try to load it, without prompting. Or
|
# configure the installer to always try to load it, without prompting. Or
|
||||||
# change to false to disable asking.
|
# change to false to disable asking.
|
||||||
@@ -171,7 +184,7 @@ d-i clock-setup/ntp-server string {{ debianunattended_ntpserver }}
|
|||||||
# - regular: use the usual partition types for your architecture
|
# - regular: use the usual partition types for your architecture
|
||||||
# - lvm: use LVM to partition the disk
|
# - lvm: use LVM to partition the disk
|
||||||
# - crypto: use LVM within an encrypted partition
|
# - crypto: use LVM within an encrypted partition
|
||||||
d-i partman-auto/method string {{ debianunattended_partman_auto_method | default('regular') }}
|
d-i partman-auto/method string {{ debianunattended_partman_auto_method | default('lvm') }}
|
||||||
|
|
||||||
# You can define the amount of space that will be used for the LVM volume
|
# You can define the amount of space that will be used for the LVM volume
|
||||||
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
|
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
|
||||||
@@ -188,10 +201,12 @@ d-i partman-md/device_remove_md boolean true
|
|||||||
d-i partman-lvm/confirm boolean true
|
d-i partman-lvm/confirm boolean true
|
||||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
# You can choose one of the three predefined partitioning recipes:
|
# You can choose one of the predefined partitioning recipes:
|
||||||
# - atomic: all files in one partition
|
# - atomic: all files in one partition
|
||||||
# - home: separate /home partition
|
# - home: separate /home partition
|
||||||
# - multi: separate /home, /var, and /tmp partitions
|
# - multi: separate /home, /var, and /tmp partitions
|
||||||
|
# - server: separate /var and /srv partitions; swap limitted to 1G
|
||||||
|
# - small_disk: scheme dedicated to small harddrives (under 10GB)
|
||||||
{% if debianunattended_partman_auto_expert_recipe is not defined %}
|
{% if debianunattended_partman_auto_expert_recipe is not defined %}
|
||||||
d-i partman-auto/choose_recipe select atomic
|
d-i partman-auto/choose_recipe select atomic
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -260,11 +275,8 @@ d-i partman/confirm_nooverwrite boolean true
|
|||||||
# The method should be set to "raid".
|
# The method should be set to "raid".
|
||||||
#d-i partman-auto/method string raid
|
#d-i partman-auto/method string raid
|
||||||
# Specify the disks to be partitioned. They will all get the same layout,
|
# Specify the disks to be partitioned. They will all get the same layout,
|
||||||
# so this will only work if the disks are the same size.preseed
|
# so this will only work if the disks are the same size.
|
||||||
#d-i partman-auto/disk string /dev/sda /dev/sdb
|
#d-i partman-auto/disk string /dev/sda /dev/sdb
|
||||||
{% if debianunattended_partman_auto_disk is defined %}
|
|
||||||
d-i partman-auto/disk string {{ debianunattended_partman_auto_disk }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Next you need to specify the physical partitions that will be used.
|
# Next you need to specify the physical partitions that will be used.
|
||||||
{{ debianunattended_partman_auto_expert_recipe | default('') }}
|
{{ debianunattended_partman_auto_expert_recipe | default('') }}
|
||||||
@@ -310,8 +322,6 @@ d-i partman-partitioning/confirm_write_new_label boolean true
|
|||||||
d-i partman/choose_partition select finish
|
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
|
||||||
d-i partman/confirm_nochanges boolean true
|
|
||||||
d-i partman-md/confirm_nooverwrite boolean true
|
|
||||||
|
|
||||||
## Controlling how partitions are mounted
|
## Controlling how partitions are mounted
|
||||||
# The default is to mount by UUID, but you can also choose "traditional" to
|
# The default is to mount by UUID, but you can also choose "traditional" to
|
||||||
@@ -333,6 +343,8 @@ d-i partman-md/confirm_nooverwrite boolean true
|
|||||||
# Choose, if you want to scan additional installation media
|
# Choose, if you want to scan additional installation media
|
||||||
# (default: false).
|
# (default: false).
|
||||||
d-i apt-setup/cdrom/set-first boolean false
|
d-i apt-setup/cdrom/set-first boolean false
|
||||||
|
# You can choose to install non-free firmware.
|
||||||
|
d-i apt-setup/non-free-firmware boolean true
|
||||||
# You can choose to install non-free and contrib software.
|
# You can choose to install non-free and contrib software.
|
||||||
d-i apt-setup/non-free boolean true
|
d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
@@ -340,7 +352,7 @@ d-i apt-setup/contrib boolean true
|
|||||||
# entry for a DVD/BD installation image active in the installed system
|
# entry for a DVD/BD installation image active in the installed system
|
||||||
# (entries for netinst or CD images will be disabled anyway, regardless of
|
# (entries for netinst or CD images will be disabled anyway, regardless of
|
||||||
# this setting).
|
# this setting).
|
||||||
d-i apt-setup/disable-cdrom-entries boolean true
|
#d-i apt-setup/disable-cdrom-entries boolean true
|
||||||
# Uncomment this if you don't want to use a network mirror.
|
# Uncomment this if you don't want to use a network mirror.
|
||||||
#d-i apt-setup/use_mirror boolean false
|
#d-i apt-setup/use_mirror boolean false
|
||||||
# Select which update services to use; define the mirrors to be used.
|
# Select which update services to use; define the mirrors to be used.
|
||||||
@@ -358,10 +370,12 @@ d-i apt-setup/disable-cdrom-entries boolean true
|
|||||||
# 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
|
# or one can provide it in-line by base64 encoding the contents of the
|
||||||
# ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the
|
# key file (with `base64 -w0`) and specifying it thus:
|
||||||
# "GPG key public keyring" format, the "keybox database" format is
|
#d-i apt-setup/local0/key string base64://LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCi4uLgo=
|
||||||
# currently not supported.
|
# The content of the key file is checked to see if it appears to be ASCII-armoured.
|
||||||
|
# If so it will be saved with an ".asc" extension, otherwise it gets a '.gpg' extension.
|
||||||
|
# "keybox database" format is currently not supported. (see generators/60local in apt-setup's source)
|
||||||
|
|
||||||
# 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
|
||||||
@@ -389,7 +403,7 @@ d-i pkgsel/upgrade select full-upgrade
|
|||||||
# You can choose, if your system will report back on what software you have
|
# You can choose, if your system will 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 should be included on the first CD/DVD.
|
# popular and should be included on the first DVD.
|
||||||
popularity-contest popularity-contest/participate boolean false
|
popularity-contest popularity-contest/participate boolean false
|
||||||
|
|
||||||
### Boot loader installation
|
### Boot loader installation
|
||||||
@@ -438,7 +452,7 @@ d-i grub-installer/bootdev string {{ debianunattended_partman_auto_disk | defau
|
|||||||
# Avoid that last message about the install being complete.
|
# Avoid that last message about the install being complete.
|
||||||
d-i finish-install/reboot_in_progress note
|
d-i finish-install/reboot_in_progress note
|
||||||
|
|
||||||
# This will prevent the installer from ejecting the CD during the reboot,
|
# This will prevent the installer from ejecting the disc during the reboot,
|
||||||
# which is useful in some situations.
|
# which is useful in some situations.
|
||||||
#d-i cdrom-detect/eject boolean false
|
#d-i cdrom-detect/eject boolean false
|
||||||
|
|
||||||
@@ -481,15 +495,6 @@ d-i finish-install/reboot_in_progress note
|
|||||||
# packages and run commands in the target system.
|
# packages and run commands in the target system.
|
||||||
d-i preseed/late_command string /cdrom/late_command.sh
|
d-i preseed/late_command string /cdrom/late_command.sh
|
||||||
|
|
||||||
##added
|
|
||||||
d-i apt-setup/cdrom/set-first boolean false
|
|
||||||
d-i apt-setup/cdrom/set-next 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-failed boolean true
|
|
||||||
pkgsel/update-policy select none
|
|
||||||
pkgsel/updatedb boolean true
|
|
||||||
|
|
||||||
{% if debianunattended_staticip_ipaddress is defined %}
|
{% if debianunattended_staticip_ipaddress is defined %}
|
||||||
#static IPv4 address?
|
#static IPv4 address?
|
||||||
d-i netcfg/disable_autoconfig boolean true
|
d-i netcfg/disable_autoconfig boolean true
|
||||||
|
|||||||
Reference in new issue
Block a user