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

Cannot limit packages for copr #8738

Closed
1 task done
ossman opened this issue Aug 10, 2024 · 8 comments
Closed
1 task done

Cannot limit packages for copr #8738

ossman opened this issue Aug 10, 2024 · 8 comments
Labels
feature This issue/PR relates to a feature request has_pr module module needs_info This issue requires further information. Please answer any outstanding questions plugins plugin (any type)

Comments

@ossman
Copy link

ossman commented Aug 10, 2024

Summary

When adding a copr repository, you generally want it for some specific thing. Therefore, it's prudent to limit DNF to only grab those specific packages from that repository and not get surprises in case the repository gets new things in the future.

Right now, that is very annoying with the copr module. It doesn't have that feature, which is fine as you can pair it with a ini_file task right after. However, the copr module resets the configuration and removes those changes every time it is run. So your ansible run is constantly considering those tasks changed.

Issue Type

Feature Idea

Component Name

copr

Additional Information

- name: add shorewall copr
  community.general.copr:
    name: ufven/epel9-extras
    state: enabled
    chroot: epel-9-x86_64

- name: limit shorewall copr
  ini_file:
    path: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ufven:epel9-extras.repo
    section: copr:copr.fedorainfracloud.org:ufven:epel9-extras
    option: includepkgs
    value: "shorewall*"

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Aug 10, 2024
@shubhamsugara22
Copy link
Contributor

from what i understand you want
the copr module should be enhanced to include an option for limiting the packages retrieved from the repository, such as includepkgs. then users can avoid the need for a separate init_file task, and the repository configuration will remain consistent across Ansible runs.
This new includepkgs option would be handled by the module and written directly into the repository configuration file
https://github.com/ansible-collections/community.general/blob/main/plugins/modules/copr.py
Am i Right or is there anything else you wanted to point out ?

@ossman
Copy link
Author

ossman commented Aug 20, 2024

That is the ideal, yes.

But there is also the intermediate step where the copr module should stop resetting the file if all the fields it cares about are correct. Right now, adding a separate ini_file task is not a good workaround because the copr task keeps undoing its work.

@russoz
Copy link
Collaborator

russoz commented Aug 27, 2024

hi @ossman is this issue solved with #8779 ? Should we close it?

@felixfontein
Copy link
Collaborator

needs_info

@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label Aug 28, 2024
@ansibullbot
Copy link
Collaborator

@ossman This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ossman You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr module module needs_info This issue requires further information. Please answer any outstanding questions plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

5 participants