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
yum_repository shouldn't require baseurl/metalink/mirrorlist to disable a repository #41178
Comments
Files identified in the description: If these files are inaccurate, please update the |
Thanks for opening this issue. I will try to look into it. |
Yes, the The `rhsm_repository' module allows for this simple way to disable all repos:
Therefore, the
I had a customer recently who wanted to provision their servers to prepare for an Ansible Tower installation. So we wanted to cleanup any defined repos for both Yum managed and RHSM managed. |
I strongly want to support this idea, because I just ran across the exact same issue. EPEL is installed on CentOS 7 via epel-release, so I absolutely do not care what the URLs etc are. I just want:
By the way, this would also serve as a sanity check. When you specify state present without any repo info, and the file is not there (because yum install epel-release failed in some strange way), you would correctly error out. |
Files identified in the description: If these files are incorrect, please update the |
Anyone planning on fixing this issue anytime soon? |
Thank you very much for your submission to Ansible. It means a lot to us that you've taken time to contribute. Unfortunately, this issue has been open for some time while waiting for a contributor to take it up but there does not seem to have been anyone that did so. So we are going to close this issue to clear up the queues and make it easier for contributors to browse possible implementation targets. However, we're absolutely always up for discussion. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: In the future, sometimes starting a discussion on the development list prior to proposing or implementing a feature can make getting things included a little easier, but it's not always necessary. Thank you once again for this and your interest in Ansible! |
don't get why this is being closed. this is still aproblem until this day. |
@markusdd The functionality can still implemented, anyone is free to send a PR but no one has done so while the issue has been open for a long time. |
SUMMARY
With yum on CentOS and most likely RHEL, Fedora, you might want to get rid of OS repositories in favor of local mirror. If you remove them, the OS might re-create them at the next yum update, so personnaly I disable them.
But ansile can't disable (enabled=false) a yum_repository without knowing its baseurl/metalink/mirrorlist. It can just remove it (state=absent).
I wish enabled=false behave the same way as state=absent, just find the unique [reponame] in the files without caring about baseurl & so on, which might change over time
ISSUE TYPE
COMPONENT NAME
yum_repository
The text was updated successfully, but these errors were encountered: