-
Notifications
You must be signed in to change notification settings - Fork 27
Fixing repeated node changes on yumcache by making this a refreshonly #12
Conversation
|
I would like to see this get merged, but I'm not sure how this pull request will change anything. https://docs.puppetlabs.com/references/latest/type.html#exec I could be wrong, but I don't see how the That way if the file ever does get updated, it will refresh the cache. |
|
@spuder You're correct. I made that change and pushed the change. |
…and apt::source resources
|
I decided to do some more work on this to appropriately utilize yumrepos and puppetlabs-apt. I've tested the CentOS changes, but have not tested the Debian/apt code. Someone want to try it out? |
|
Any thoughts on this pull request. The module is really not very usable currently in a production environment if the node is going to change every single puppet run. |
|
Hi: I'm filling in my thoughts about this here so that anyone following can understand my reasoning. If This breaks a major use case of packagecloud -- many people upload software artifacts to their repositories throughout the day as part of their continuous integration and delivery pipelines and changing this would break their ability to install the latest versions of their software on each puppet run. I'm open to changing this in some fashion, but we must preserve this use case. As far as using the |
|
I suggest adding some logic for that use case. if $::puppetversion <= $theolderversion { } Or to keep it clean split the module into 2 versions. |
|
What if you add a new manifest that forces an update of the cache. Something like Then you would have a refresh.pp manifest with an exec in it In your init.pp, have a condition. ahuffman has a good idea on the yumrepo resource. You would still need to add it as a dependency, but you could have a decision tree based on the puppet version. If using the stdlib library Plain old facter |
|
The purpose of Puppet code is to be idempotent which is not the case right now. This should definitely be merged in my opinion. |
My nodes were executing the yum_make_cache repeatedly even though they completed successfully previously on every puppet run. This will correct that issue.