-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add purge capability to resources #103
Comments
Indeed, and I didn't find them because they're closed... I'll have a look at switching to using the Still, this is quite a big issue IMHO, since these types are typically ones that would benefit a lot from purging... |
and what's wrong with the solution at #17 (comment) ? |
The problem with that solution is that you could add this to the manifest, then remove it, but it would stay present on the node : package_use { 'dev/example':
use => 'foo',
target => 'example'
} This is because the So this is what's required for a workaround which matches my expectations of a full purge : Any resources no longer declared in the manifest are guaranteed to not be there : resources { 'package_use': purge => true }
exec { '/bin/rm -f /etc/portage/package.use':
onlyif => '/usr/bin/test -f /etc/portage/package.use',
} ->
file { '/etc/portage/package.use':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
recurse => true,
purge => true,
} ->
Package_use <| |>
file { '/etc/portage/package.use/default': } It looks overkill, but unfortunately it's not... What do you want to do from here? Keep a bug report open to track possible ways of improving this? Have me submit an update to the README to mention this? |
Let's keep this open and see what others will say. I don't have a strong opinion yet on how to proceed |
I believe this is a limitation of the http://adrienthebo.github.io/puppet-filemapper/#Removing_empty_files |
Update : Note that my workaround no longer works, and is no longer possible to use, once you include the As @vikraman wrote, it seems like my initial problem would be solved by moving to the filemapper, though I would still have the purge issue for the directories declared by the main portage class. |
I've just declared the following :
My problem is that if I remove any of the 3
package_use
lines, the content of the/etc/portage/package.use
file isn't updated (the entry isn't removed). I would like that to be possible without having to useensure => absent
. Other types typically have it working when doing this (which I've tried, but didn't work) :I haven't used the other
package_*
types yet, but I expect that this might apply to them too.The reason for this is that I want my systems 100% puppet-managed (hence the target I use), and it's much more convenient to just remove obsolete code from the manifests rather than having to always change to absent and keep forever just in case.
The text was updated successfully, but these errors were encountered: