Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the right systemd service for remediations in EL 10+ #209

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptoscano
Copy link
Collaborator

EL 10 has a newer yggdrasil service for remediations, so instead of 'rhcd' the upstream name 'yggdrasil' is used.

Hence:

  • create an helper variable for the service name depending on the EL version; since Insights is specific to RHEL, it is possible to assume the name based on the major version of the distribution
  • use the new variable when enabling or disabling the service for remediations
  • in the test case for remediation:
    • export the variables of the role as public, so the new private variable can be used
    • set an helper fact with the systemd service including the '.service' extension

Fixes: CCT-1057

EL 10 has a newer yggdrasil service for remediations, so instead of
'rhcd' the upstream name 'yggdrasil' is used.

Hence:
- create an helper variable for the service name depending on the EL
  version; since Insights is specific to RHEL, it is possible to assume
  the name based on the major version of the distribution
- use the new variable when enabling or disabling the service for
  remediations
- in the test case for remediation:
  - export the variables of the role as public, so the new private
    variable can be used
  - set an helper fact with the systemd service including the '.service'
    extension

Fixes: CCT-1057

Signed-off-by: Pino Toscano <[email protected]>
@ptoscano ptoscano force-pushed the insights-rhc-service branch from 6e4ead4 to d3fc6de Compare January 20, 2025 17:21
@richm
Copy link
Contributor

richm commented Jan 20, 2025

[citest]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants