diff --git a/internal/distro/rhel84/distro_v2.go b/internal/distro/rhel84/distro_v2.go index eea7e78f0..93cdddd55 100644 --- a/internal/distro/rhel84/distro_v2.go +++ b/internal/distro/rhel84/distro_v2.go @@ -265,7 +265,7 @@ func (t *imageTypeS2) pipelines(customizations *blueprint.Customizations, option } // TODO: panic if not found kernelVer := fmt.Sprintf("%s-%s.%s", kernelPkg.Version, kernelPkg.Release, kernelPkg.Arch) - anacondaPipeline, err := t.anacondaTreePipeline(repos, packageSetSpecs["installer"], options, kernelVer) + anacondaPipeline, err := t.anacondaTreePipeline(repos, customizations, packageSetSpecs["installer"], options, kernelVer) if err != nil { return nil, err } @@ -439,7 +439,7 @@ func (t *imageTypeS2) containerPipeline() *osbuild.Pipeline { return p } -func (t *imageTypeS2) anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, options distro.ImageOptions, kernelVer string) (*osbuild.Pipeline, error) { +func (t *imageTypeS2) anacondaTreePipeline(repos []rpmmd.RepoConfig, customizations *blueprint.Customizations, packages []rpmmd.PackageSpec, options distro.ImageOptions, kernelVer string) (*osbuild.Pipeline, error) { ostreeRepoPath := "/ostree/repo" p := new(osbuild.Pipeline) p.Name = "anaconda-tree" @@ -478,10 +478,11 @@ func (t *imageTypeS2) anacondaTreePipeline(repos []rpmmd.RepoConfig, packages [] } p.AddStage(osbuild.NewUsersStage(usersStageOptions)) - p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(false))) + nUsers := len(customizations.GetUsers())+len(customizations.GetGroups()) > 0 + p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(nUsers))) p.AddStage(osbuild.NewLoraxScriptStage(t.loraxScriptStageOptions())) p.AddStage(osbuild.NewDracutStage(t.dracutStageOptions(kernelVer))) - kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", nil, nil, fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref) + kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", customizations.GetUsers(), customizations.GetGroups(), fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref) if err != nil { return nil, err } diff --git a/internal/distro/rhel85/pipelines.go b/internal/distro/rhel85/pipelines.go index 722dcfeff..b135c739b 100644 --- a/internal/distro/rhel85/pipelines.go +++ b/internal/distro/rhel85/pipelines.go @@ -493,11 +493,12 @@ func edgeInstallerPipelines(t *imageType, customizations *blueprint.Customizatio kernelVer := rpmmd.GetVerStrFromPackageSpecListPanic(installerPackages, "kernel") ostreeRepoPath := "/ostree/repo" payloadStages := ostreePayloadStages(options, ostreeRepoPath) - kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", nil, nil, makeISORootPath(ostreeRepoPath), options.OSTree.Ref) + kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", customizations.GetUsers(), customizations.GetGroups(), makeISORootPath(ostreeRepoPath), options.OSTree.Ref) if err != nil { return nil, err } - pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name())) + ksUsers := len(customizations.GetUsers())+len(customizations.GetGroups()) > 0 + pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), ksUsers)) pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), kickstartOptions, payloadStages)) pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), false)) return pipelines, nil @@ -531,12 +532,12 @@ func tarInstallerPipelines(t *imageType, customizations *blueprint.Customization tarPath := "/liveimg.tar" tarPayloadStages := []*osbuild.Stage{tarStage("os", tarPath)} - kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, makeISORootPath(tarPath), nil, nil, "", "") + kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, makeISORootPath(tarPath), customizations.GetUsers(), customizations.GetGroups(), "", "") if err != nil { return nil, err } - pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name())) + pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), true)) pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), kickstartOptions, tarPayloadStages)) pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), true)) return pipelines, nil @@ -671,14 +672,16 @@ func osPipeline(t *imageType, p.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{Timeservers: ntpServers})) } - if groups := c.GetGroups(); len(groups) > 0 { - p.AddStage(osbuild.NewGroupsStage(osbuild.NewGroupsStageOptions(groups))) - } + if !t.bootISO { + if groups := c.GetGroups(); len(groups) > 0 { + p.AddStage(osbuild.NewGroupsStage(osbuild.NewGroupsStageOptions(groups))) + } - if userOptions, err := osbuild.NewUsersStageOptions(c.GetUsers(), false); err != nil { - return nil, err - } else if userOptions != nil { - p.AddStage(osbuild.NewUsersStage(userOptions)) + if userOptions, err := osbuild.NewUsersStageOptions(c.GetUsers(), false); err != nil { + return nil, err + } else if userOptions != nil { + p.AddStage(osbuild.NewUsersStage(userOptions)) + } } if services := c.GetServices(); services != nil || t.enabledServices != nil || t.disabledServices != nil || t.defaultTarget != "" { @@ -1164,7 +1167,7 @@ func ostreeDeployPipeline( return p } -func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string) *osbuild.Pipeline { +func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string, users bool) *osbuild.Pipeline { p := new(osbuild.Pipeline) p.Name = "anaconda-tree" p.Build = "name:build" @@ -1197,7 +1200,7 @@ func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec } p.AddStage(osbuild.NewUsersStage(usersStageOptions)) - p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(false))) + p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(users))) p.AddStage(osbuild.NewLoraxScriptStage(loraxScriptStageOptions(arch))) p.AddStage(osbuild.NewDracutStage(dracutStageOptions(kernelVer, arch, []string{ "anaconda", diff --git a/internal/distro/rhel90beta/pipelines.go b/internal/distro/rhel90beta/pipelines.go index 52533c797..a0acd148a 100644 --- a/internal/distro/rhel90beta/pipelines.go +++ b/internal/distro/rhel90beta/pipelines.go @@ -625,8 +625,9 @@ func edgeInstallerPipelines(t *imageType, customizations *blueprint.Customizatio kernelVer := rpmmd.GetVerStrFromPackageSpecListPanic(installerPackages, "kernel") ostreeRepoPath := "/ostree/repo" - pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), ostreePayloadStages(options, ostreeRepoPath))) - kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", nil, nil, fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref) + ksUsers := len(customizations.GetUsers())+len(customizations.GetGroups()) > 0 + pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), ostreePayloadStages(options, ostreeRepoPath), ksUsers)) + kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", customizations.GetUsers(), customizations.GetGroups(), fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref) if err != nil { return nil, err } @@ -663,8 +664,8 @@ func tarInstallerPipelines(t *imageType, customizations *blueprint.Customization tarPath := "/liveimg.tar" tarPayloadStages := []*osbuild.Stage{tarStage("os", tarPath)} - pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), tarPayloadStages)) - kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, fmt.Sprintf("file://%s", tarPath), nil, nil, "", "") + pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), tarPayloadStages, true)) + kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, fmt.Sprintf("file://%s", tarPath), customizations.GetUsers(), customizations.GetGroups(), "", "") if err != nil { return nil, err } @@ -757,14 +758,16 @@ func osPipeline(t *imageType, p.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{Timeservers: ntpServers})) } - if groups := c.GetGroups(); len(groups) > 0 { - p.AddStage(osbuild.NewGroupsStage(osbuild.NewGroupsStageOptions(groups))) - } + if !t.bootISO { + if groups := c.GetGroups(); len(groups) > 0 { + p.AddStage(osbuild.NewGroupsStage(osbuild.NewGroupsStageOptions(groups))) + } - if userOptions, err := osbuild.NewUsersStageOptions(c.GetUsers(), false); err != nil { - return nil, err - } else if userOptions != nil { - p.AddStage(osbuild.NewUsersStage(userOptions)) + if userOptions, err := osbuild.NewUsersStageOptions(c.GetUsers(), false); err != nil { + return nil, err + } else if userOptions != nil { + p.AddStage(osbuild.NewUsersStage(userOptions)) + } } if services := c.GetServices(); services != nil || t.enabledServices != nil || t.disabledServices != nil || t.defaultTarget != "" { @@ -982,7 +985,7 @@ func ostreePayloadStages(options distro.ImageOptions, ostreeRepoPath string) []* return stages } -func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string, payloadStages []*osbuild.Stage) *osbuild.Pipeline { +func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string, payloadStages []*osbuild.Stage, users bool) *osbuild.Pipeline { p := new(osbuild.Pipeline) p.Name = "anaconda-tree" p.Build = "name:build" @@ -1018,7 +1021,7 @@ func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec } p.AddStage(osbuild.NewUsersStage(usersStageOptions)) - p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(false))) + p.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(users))) p.AddStage(osbuild.NewLoraxScriptStage(loraxScriptStageOptions(arch))) p.AddStage(osbuild.NewDracutStage(dracutStageOptions(kernelVer))) diff --git a/test/data/manifests/rhel_84-x86_64-rhel_edge_installer_with_users-boot.json b/test/data/manifests/rhel_84-x86_64-rhel_edge_installer_with_users-boot.json index 2251b94a8..dcf6d1251 100644 --- a/test/data/manifests/rhel_84-x86_64-rhel_edge_installer_with_users-boot.json +++ b/test/data/manifests/rhel_84-x86_64-rhel_edge_installer_with_users-boot.json @@ -1308,7 +1308,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1394,6 +1395,28 @@ "url": "file:///ostree/repo", "ref": "test/edge", "gpg": false + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } } diff --git a/test/data/manifests/rhel_85-aarch64-edge_installer_with_users-boot.json b/test/data/manifests/rhel_85-aarch64-edge_installer_with_users-boot.json index 6aeb067e3..43a9e4aa6 100644 --- a/test/data/manifests/rhel_85-aarch64-edge_installer_with_users-boot.json +++ b/test/data/manifests/rhel_85-aarch64-edge_installer_with_users-boot.json @@ -1242,7 +1242,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1373,6 +1374,28 @@ "url": "file:///run/install/repo/ostree/repo", "ref": "test/edge", "gpg": false + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } }, diff --git a/test/data/manifests/rhel_85-x86_64-edge_installer_with_users-boot.json b/test/data/manifests/rhel_85-x86_64-edge_installer_with_users-boot.json index feccf6edd..7927c5947 100644 --- a/test/data/manifests/rhel_85-x86_64-edge_installer_with_users-boot.json +++ b/test/data/manifests/rhel_85-x86_64-edge_installer_with_users-boot.json @@ -1268,7 +1268,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1401,6 +1402,28 @@ "url": "file:///run/install/repo/ostree/repo", "ref": "test/edge", "gpg": false + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } }, diff --git a/test/data/manifests/rhel_85-x86_64-image_installer-boot.json b/test/data/manifests/rhel_85-x86_64-image_installer-boot.json index 608cc7c5c..8ad1d8f35 100644 --- a/test/data/manifests/rhel_85-x86_64-image_installer-boot.json +++ b/test/data/manifests/rhel_85-x86_64-image_installer-boot.json @@ -1792,7 +1792,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, diff --git a/test/data/manifests/rhel_85-x86_64-image_installer_with_users-boot.json b/test/data/manifests/rhel_85-x86_64-image_installer_with_users-boot.json index 3c26c85ac..36cdd0340 100644 --- a/test/data/manifests/rhel_85-x86_64-image_installer_with_users-boot.json +++ b/test/data/manifests/rhel_85-x86_64-image_installer_with_users-boot.json @@ -915,38 +915,6 @@ "zone": "America/New_York" } }, - { - "type": "org.osbuild.groups", - "options": { - "groups": { - "group1": { - "gid": 1030 - }, - "group2": { - "gid": 1050 - } - } - } - }, - { - "type": "org.osbuild.users", - "options": { - "users": { - "user2": { - "uid": 1020, - "gid": 1050, - "groups": [ - "group1" - ], - "description": "description 2", - "home": "/home/home2", - "shell": "/bin/sh", - "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", - "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" - } - } - } - }, { "type": "org.osbuild.sysconfig", "options": { @@ -1853,7 +1821,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1983,6 +1952,28 @@ "path": "/osbuild.ks", "liveimg": { "url": "file:///run/install/repo/liveimg.tar" + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } }, diff --git a/test/data/manifests/rhel_90_beta-x86_64-edge_installer_with_users-boot.json b/test/data/manifests/rhel_90_beta-x86_64-edge_installer_with_users-boot.json index f6618d4c1..ebb927764 100644 --- a/test/data/manifests/rhel_90_beta-x86_64-edge_installer_with_users-boot.json +++ b/test/data/manifests/rhel_90_beta-x86_64-edge_installer_with_users-boot.json @@ -1305,7 +1305,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1438,6 +1439,28 @@ "url": "file:///ostree/repo", "ref": "test/edge", "gpg": false + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } }, diff --git a/test/data/manifests/rhel_90_beta-x86_64-image_installer-boot.json b/test/data/manifests/rhel_90_beta-x86_64-image_installer-boot.json index 12a1f13a9..8bde45cce 100644 --- a/test/data/manifests/rhel_90_beta-x86_64-image_installer-boot.json +++ b/test/data/manifests/rhel_90_beta-x86_64-image_installer-boot.json @@ -1787,7 +1787,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, diff --git a/test/data/manifests/rhel_90_beta-x86_64-image_installer_with_users-boot.json b/test/data/manifests/rhel_90_beta-x86_64-image_installer_with_users-boot.json index cccfd0165..f03b637d7 100644 --- a/test/data/manifests/rhel_90_beta-x86_64-image_installer_with_users-boot.json +++ b/test/data/manifests/rhel_90_beta-x86_64-image_installer_with_users-boot.json @@ -875,38 +875,6 @@ "zone": "America/New_York" } }, - { - "type": "org.osbuild.groups", - "options": { - "groups": { - "group1": { - "gid": 1030 - }, - "group2": { - "gid": 1050 - } - } - } - }, - { - "type": "org.osbuild.users", - "options": { - "users": { - "user2": { - "uid": 1020, - "gid": 1050, - "groups": [ - "group1" - ], - "description": "description 2", - "home": "/home/home2", - "shell": "/bin/sh", - "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", - "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" - } - } - } - }, { "type": "org.osbuild.sysconfig", "options": { @@ -1848,7 +1816,8 @@ "kickstart-modules": [ "org.fedoraproject.Anaconda.Modules.Network", "org.fedoraproject.Anaconda.Modules.Payloads", - "org.fedoraproject.Anaconda.Modules.Storage" + "org.fedoraproject.Anaconda.Modules.Storage", + "org.fedoraproject.Anaconda.Modules.Users" ] } }, @@ -1978,6 +1947,28 @@ "path": "/osbuild.ks", "liveimg": { "url": "file:///liveimg.tar" + }, + "users": { + "user2": { + "uid": 1020, + "gid": 1050, + "groups": [ + "group1" + ], + "description": "description 2", + "home": "/home/home2", + "shell": "/bin/sh", + "password": "$6$BhyxFBgrEFh0VrPJ$MllG8auiU26x2pmzL4.1maHzPHrA.4gTdCvlATFp8HJU9UPee4zCS9BVl2HOzKaUYD/zEm8r/OF05F2icWB0K/", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC61wMCjOSHwbVb4VfVyl5sn497qW4PsdQ7Ty7aD6wDNZ/QjjULkDV/yW5WjDlDQ7UqFH0Sr7vywjqDizUAqK7zM5FsUKsUXWHWwg/ehKg8j9xKcMv11AkFoUoujtfAujnKODkk58XSA9whPr7qcw3vPrmog680pnMSzf9LC7J6kXfs6lkoKfBh9VnlxusCrw2yg0qI1fHAZBLPx7mW6+me71QZsS6sVz8v8KXyrXsKTdnF50FjzHcK9HXDBtSJS5wA3fkcRYymJe0o6WMWNdgSRVpoSiWaHHmFgdMUJaYoCfhXzyl7LtNb3Q+Sveg+tJK7JaRXBLMUllOlJ6ll5Hod root@localhost" + } + }, + "groups": { + "group1": { + "gid": 1030 + }, + "group2": { + "gid": 1050 + } } } },