voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 99 forks source link

Permit easily purging unmanaged repos #258

Closed jcpunk closed 2 years ago

jcpunk commented 2 years ago

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

jcpunk commented 2 years ago

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

mphilipps commented 2 years ago

@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 commented 2 years ago
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 commented 2 years ago

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

My target use case is paired with https://github.com/voxpupuli/puppet-rhsm/commit/1c2abe59cc8b3459dc95f4ad6c85db5a51d2fbdb so that I can be sure only redhat.repo is in /etc/yum.repos.d/ on certain systems.

jcpunk commented 2 years ago

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

kenyon commented 1 year ago

This was an attempted fix of #94.