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

RFE: Allow configuring repositories exclusively #143

Open
myllynen opened this issue Oct 12, 2023 · 2 comments
Open

RFE: Allow configuring repositories exclusively #143

myllynen opened this issue Oct 12, 2023 · 2 comments

Comments

@myllynen
Copy link

It is not possible to configure repositories exclusively in an idempotent fashion today with rhc. This works:

    rhc_repositories:
      - {name: "*", state: disabled}
      - {name: "rhel-9-for-x86_64-baseos-rpms", state: enabled}
      - {name: "rhel-9-for-x86_64-appstream-rpms", state: enabled}

but this is not idempotent and this seems to do lots of work on each run. It would look better to allow using the purge parameter for configuring repositories exclusively. Thanks.

@ptoscano
Copy link
Collaborator

but this is not idempotent and this seems to do lots of work on each run

This is correct at the moment, yes.

It would look better to allow using the purge parameter for configuring repositories exclusively.

The purge attribute as available in the rhsm_repository module is a complete mess:

  • its semantics were bolted on top of the existing enable/disable logic, and the resulting flow is overly complicated
  • its semantics are not even totally clear: some of the combination of parameters with it create unintuitive results
  • I did some changes a couple of months ago to that module, and the changes were from easy, even because of purge

So, with both my rhc role maintainer hat, and my rhsm_repository upstream module maintainer hat, I disagree that purge is a good solution for this issue. The fact that the role allows users to specify the repositories this way gives some room for potential optimization, either in the role itself or in rhsm_repository; this will need some design/thoughts.

@myllynen
Copy link
Author

Ok, as long as this feature will be available in the future then the implementation details for role users are not that important.

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

No branches or pull requests

2 participants