Skip to content

Commit

Permalink
test: add a config that uses a user kickstart file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
achilleas-k committed Apr 29, 2024
1 parent 15e3047 commit c44037b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/config-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
31 changes: 31 additions & 0 deletions test/configs/unattended-iso-userkickstart.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}

0 comments on commit c44037b

Please sign in to comment.