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

Permit easily purging unmanaged repos #258

Merged
merged 1 commit into from
Jul 2, 2022
Merged

Permit easily purging unmanaged repos #258

merged 1 commit into from
Jul 2, 2022

Conversation

jcpunk
Copy link

@jcpunk jcpunk commented Jun 22, 2022

Pull Request (PR) description

With the support for defining repos, it is helpful to have an easy way to purge unmanaged repos.

This Pull Request (PR) fixes the following issues

N/A

manifests/init.pp Outdated Show resolved Hide resolved
@jcpunk jcpunk requested a review from bastelfreak July 2, 2022 19:35
@bastelfreak bastelfreak added the enhancement New feature or request label Jul 2, 2022
@bastelfreak bastelfreak merged commit 37427d4 into voxpupuli:master Jul 2, 2022
@jcpunk jcpunk deleted the purge-unmanaged branch July 2, 2022 19:51
@jcpunk
Copy link
Author

jcpunk commented Jul 2, 2022

Can you release a new forge version with the last batch of changes?

@mphilipps
Copy link

mphilipps commented Jul 4, 2022

@jcpunk does this actually work? If I just create a purge file resource for the directory, the module creates the repos and then purges them again each run. Apparently the modules creates files without using the file resources.

@mphilipps
Copy link

Jul  4 13:46:10 puppettest-linux-centos-7-64bit puppet-agent[11376]: (/Stage[main]/Yum/Yumrepo[extras]/ensure) created (corrective)
...
Jul  4 13:46:18 puppettest-linux-centos-7-64bit puppet-agent[11376]: (/Stage[main]/Yum/File[/etc/yum.repos.d/extras.repo]/ensure) removed (corrective)

That is from one run.

@jcpunk
Copy link
Author

jcpunk commented Jul 4, 2022

I'm a bit surprised that the yumrepo type doesn't provide the file resources....

My target use case is paired with voxpupuli/puppet-rhsm@1c2abe5 so that I can be sure only redhat.repo is in /etc/yum.repos.d/ on certain systems.

@jcpunk
Copy link
Author

jcpunk commented Jul 5, 2022

I've popped open https://tickets.puppetlabs.com/browse/PUP-11585 (I can't seem to create tickets against the MODULE project....)

@kenyon
Copy link
Member

kenyon commented Dec 6, 2022

This was an attempted fix of #94.

kenyon added a commit to kenyon/puppet-yum that referenced this pull request Dec 7, 2022
This method of purging unmanaged yum repo configs does not work.

Fixes voxpupuli#285
kenyon added a commit that referenced this pull request Dec 9, 2022
Revert #258, which added purge_unmanaged_repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants