Skip to content

Commit

Permalink
manifest: add insights-client.service enable
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Holloway <[email protected]>
  • Loading branch information
loadtheaccumulator committed Feb 4, 2025
1 parent e569940 commit 8a291d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/manifest/anaconda_installer_iso_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ func (p *AnacondaInstallerISOTree) makeKickstartStages(stageOptions *osbuild.Kic

}
hardcodedKickstartBits += makeKickstartSubscriptionPost(subscriptionPath, systemPath)
hardcodedKickstartBits += makeKickstartInsightsClientBootPost()

// include a readme file on the ISO in the subscription path to explain what it's for
subscriptionReadme, err := fsnode.NewFile(
Expand Down Expand Up @@ -780,3 +781,13 @@ systemctl enable osbuild-subscription-register.service
`
return fmt.Sprintf(kickstartSubscriptionPost, fullSourcePath, dest)
}

func makeKickstartInsightsClientBootPost() string {

kickstartInsightsClientBootPost := `
%%post
systemctl enable insights-client.service
%%end
`
return fmt.Sprintf(kickstartInsightsClientBootPost)
}
9 changes: 9 additions & 0 deletions pkg/manifest/anaconda_installer_iso_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,3 +768,12 @@ func TestPayloadRemoveSignatures(t *testing.T) {
assert.Equal(t, tc.expected, skopeoStage.Options.(*osbuild.SkopeoStageOptions).RemoveSignatures)
}
}

func TestMakeKickstartInsightsClientBootPost(t *testing.T) {
exp := `
%post
systemctl enable insights-client.service
%end
`
assert.Equal(t, exp, makeKickstartInsightsClientBootPost())
}

0 comments on commit 8a291d7

Please sign in to comment.