From 1684b8f4a40eaafc88bf5bb8df5dc5a141941901 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 25 Apr 2024 00:31:40 +0200 Subject: [PATCH] test: add a config that uses a user kickstart file The user kickstart contents is identical to the contents added when the sudo-nopasswd options are enabled, so this configuration produces the same manifest as the unattended-iso configuration. --- test/config-map.json | 8 +++++ .../configs/unattended-iso-userkickstart.json | 31 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 test/configs/unattended-iso-userkickstart.json diff --git a/test/config-map.json b/test/config-map.json index c7d568e813..ef97a7b988 100644 --- a/test/config-map.json +++ b/test/config-map.json @@ -250,6 +250,14 @@ "image-installer" ] }, + "./configs/unattended-iso-userkickstart.json": { + "distros": [ + "rhel-9.4" + ], + "image-types": [ + "image-installer" + ] + }, "./configs/ostree-filesystem-customizations-installer.json": { "image-types": [ "edge-simplified-installer" diff --git a/test/configs/unattended-iso-userkickstart.json b/test/configs/unattended-iso-userkickstart.json new file mode 100644 index 0000000000..c165c8a3a3 --- /dev/null +++ b/test/configs/unattended-iso-userkickstart.json @@ -0,0 +1,31 @@ +{ + "name": "unattended-iso-userkickstart", + "blueprint": { + "customizations": { + "user": [ + { + "groups": [ + "wheel" + ], + "key": "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNebAh6SjpAn8wB53K4695cGnHGuCtl4RdaX3futZgJUultHyzeYHnzMO7d4++qnRL+Rworew62LKP560uvtncc= github.com/osbuild/images", + "name": "osbuild" + } + ], + "locale": { + "languages": [ + "en_GB.UTF-8" + ], + "keyboard": "uk" + }, + "timezone": { + "timezone": "Europe/Berlin" + }, + "installer": { + "unattended": true, + "kickstart": { + "contents": "%post\necho -e \"%sudo\\tALL=(ALL)\\tNOPASSWD: ALL\" > \"/etc/sudoers.d/%sudo\"\nchmod 0440 /etc/sudoers.d/%sudo\necho -e \"%wheel\\tALL=(ALL)\\tNOPASSWD: ALL\" > \"/etc/sudoers.d/%wheel\"\nchmod 0440 /etc/sudoers.d/%wheel\nrestorecon -rvF /etc/sudoers.d\n%end\n" + } + } + } + } +}