diff --git a/internal/distro/rhel9/images.go b/internal/distro/rhel9/images.go index f5e87c149..37a8d7df2 100644 --- a/internal/distro/rhel9/images.go +++ b/internal/distro/rhel9/images.go @@ -218,6 +218,9 @@ func edgeCommitImage(workload workload.Workload, URL: options.OSTree.URL, ContentURL: options.OSTree.ContentURL, } + if options.OSTree.RHSM { + img.OSTreeParent.Secrets = "org.osbuild.rhsm.consumer" + } } img.OSVersion = t.arch.distro.osVersion @@ -249,6 +252,9 @@ func edgeContainerImage(workload workload.Workload, URL: options.OSTree.URL, ContentURL: options.OSTree.ContentURL, } + if options.OSTree.RHSM { + img.OSTreeParent.Secrets = "org.osbuild.rhsm.consumer" + } } img.OSVersion = t.arch.distro.osVersion @@ -276,6 +282,9 @@ func edgeInstallerImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, Checksum: options.OSTree.FetchChecksum, } + if options.OSTree.RHSM { + commit.Secrets = "org.osbuild.rhsm.consumer" + } img := image.NewOSTreeInstaller(commit) img.Platform = t.platform