From e4cd2dd84f60e9a2330d330ae2352b709fbfebe4 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 26 Mar 2024 13:28:32 +0100 Subject: [PATCH] Cleanup, rename kernel_features to match purpose Signed-off-by: Knut Ahlers --- alpine-on-hetzner/alpine.pkr.hcl | 22 ------ alpine-on-hetzner/default.json | 127 +++++++++++++++++-------------- alpine-on-hetzner/playbook.yml | 2 +- config.yaml | 2 +- 4 files changed, 70 insertions(+), 83 deletions(-) diff --git a/alpine-on-hetzner/alpine.pkr.hcl b/alpine-on-hetzner/alpine.pkr.hcl index 52633a0..f94a018 100644 --- a/alpine-on-hetzner/alpine.pkr.hcl +++ b/alpine-on-hetzner/alpine.pkr.hcl @@ -1,27 +1,5 @@ # Please see default.json for default values for these -variable "apk_tools_url" {} -variable "apk_tools_arch" {} -variable "apk_tools_version" {} -variable "apk_tools_checksum" {} - -variable "alpine_mirror" {} -variable "alpine_repositories" {} -variable "alpine_repository_keys" {} - -variable "boot_size" {} -variable "root_size" {} variable "hostname" {} -variable "dhcp_interfaces" {} - -variable "packages" {} -variable "services" {} -variable "nameservers" {} -variable "extlinux_modules" {} -variable "kernel_features" {} -variable "kernel_modules" {} -variable "default_kernel_opts" {} -variable "sysctl" {} -variable "chroot_commands" {} locals { timestamp = formatdate("YYYYMMDD-hhmmss", timestamp()) diff --git a/alpine-on-hetzner/default.json b/alpine-on-hetzner/default.json index 1ef6309..3e13952 100644 --- a/alpine-on-hetzner/default.json +++ b/alpine-on-hetzner/default.json @@ -1,61 +1,70 @@ { - "apk_tools_version": "v2.12.9", - "apk_tools_arch": "x86_64", - "apk_tools_url": "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//{{ apk_tools_version }}/{{ apk_tools_arch }}/apk.static", - "apk_tools_checksum": "sha256:5176da3d4c41f12a08b82809aca8e7e2e383b7930979651b8958eca219815af5", - - "alpine_repositories": [ - {"tag":"", "url": "http://dl-cdn.alpinelinux.org/alpine/edge/main"}, - {"tag":"", "url": "http://dl-cdn.alpinelinux.org/alpine/edge/community"}, - ], - "alpine_repository_keys": [], - - "boot_size": "+100m", - "root_size": "0", - - "hostname": "alpine", - - "dhcp_interfaces": ["eth0"], - - "packages": { - "openssh": "=8.8_p1-r1", - "syslinux": "=6.04_pre1-r9", - "linux-virt": "=5.15.16-r0", - "cloud-init": "@community=21.4-r0" + "apk_tools_version": "v2.12.9", + "apk_tools_arch": "x86_64", + "apk_tools_url": "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//{{ apk_tools_version }}/{{ apk_tools_arch }}/apk.static", + "apk_tools_checksum": "sha256:5176da3d4c41f12a08b82809aca8e7e2e383b7930979651b8958eca219815af5", + "alpine_repositories": [ + { + "tag": "", + "url": "http://dl-cdn.alpinelinux.org/alpine/edge/main" }, - - "services": { - "devfs": "sysinit", - "dmesg": "sysinit", - "mdev": "sysinit", - "hwdrivers": "sysinit", - - "hwclock": "boot", - "modules": "boot", - "sysctl": "boot", - "hostname": "boot", - "bootmisc": "boot", - "syslog": "boot", - "networking": "boot", - - "mount-ro": "shutdown", - "killprocs": "shutdown", - "savecache": "shutdown", - - "sshd": "default" - }, - - "nameservers": [ - "185.12.64.1", - "185.12.64.2", - "2a01:4ff:ff00::add:1", - "2a01:4ff:ff00::add:2" - ], - - "sysctl": {}, - "extlinux_modules": ["ext4"], - "kernel_features": ["base", "ext4", "keymap", "virtio"], - "kernel_modules": ["ipv6", "af_packet"], - "default_kernel_opts": ["quiet"], - "chroot_commands": [] -} + { + "tag": "", + "url": "http://dl-cdn.alpinelinux.org/alpine/edge/community" + } + ], + "alpine_repository_keys": [], + "boot_size": "+100m", + "root_size": "0", + "hostname": "alpine", + "dhcp_interfaces": [ + "eth0" + ], + "packages": { + "openssh": "=8.8_p1-r1", + "syslinux": "=6.04_pre1-r9", + "linux-virt": "=5.15.16-r0", + "cloud-init": "@community=21.4-r0" + }, + "services": { + "devfs": "sysinit", + "dmesg": "sysinit", + "mdev": "sysinit", + "hwdrivers": "sysinit", + "hwclock": "boot", + "modules": "boot", + "sysctl": "boot", + "hostname": "boot", + "bootmisc": "boot", + "syslog": "boot", + "networking": "boot", + "mount-ro": "shutdown", + "killprocs": "shutdown", + "savecache": "shutdown", + "sshd": "default" + }, + "nameservers": [ + "185.12.64.1", + "185.12.64.2", + "2a01:4ff:ff00::add:1", + "2a01:4ff:ff00::add:2" + ], + "sysctl": {}, + "extlinux_modules": [ + "ext4" + ], + "mkinitfs_features": [ + "base", + "ext4", + "keymap", + "virtio" + ], + "kernel_modules": [ + "ipv6", + "af_packet" + ], + "default_kernel_opts": [ + "quiet" + ], + "chroot_commands": [] +} \ No newline at end of file diff --git a/alpine-on-hetzner/playbook.yml b/alpine-on-hetzner/playbook.yml index ca61967..0a929a4 100644 --- a/alpine-on-hetzner/playbook.yml +++ b/alpine-on-hetzner/playbook.yml @@ -177,7 +177,7 @@ copy: dest: "{{ chroot_directory }}/etc/mkinitfs/mkinitfs.conf" content: | - features="{{ kernel_features | join(" ") }}" + features="{{ mkinitfs_features | join(" ") }}" - name: install boot shell: | diff --git a/config.yaml b/config.yaml index ef1a8b5..ebdd8ad 100644 --- a/config.yaml +++ b/config.yaml @@ -117,7 +117,7 @@ sysctl: extlinux_modules: - ext4 -kernel_features: +mkinitfs_features: - ata - base - ext4