-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Salt minion provisioning: cleanup after provisioned #5242
Comments
@davidkarlsen I am not quite sure, why I would want this by default. I am not using it in my setups and it doesn't sound like something that should be always done. Could you explain, why you think this is necessary as a default? |
Because I use salt masterless to build a box and repackage it for distribution. And I want to remove as much residual config as possible (caches in var etc), before I zero and repackage the image. |
I understand. So this should be introduced as a configurable option that is deactivated by default. Do you agree? |
That sounds reasonable |
Well, I am a reasonable man. I will try to get another change in that touches the part of the code that will be involved in this change here (at least I think so - I did not dive into the sources yet). So if I get #5849 done I might be able to add this as well. I wonder if we should do this a bit more generic right away to make it possible to issue an arbitrary call (or script) after provisioning to make this usable for other scenarios as well. I don't know if something like this would be useful though ... @mitchellh Is there any kind of generic post provisioning step/hook that could be used for use cases like this? |
On the other hand: the way you're doing it at the moment is somehow a post provisioning step by using the shell provisioner - so this is actually doing the job just fine. Maybe this enhancement is not really necessary for something specialized like you are doing? |
@davidkarlsen What did you think about my last suggestion? I think we could close this as wontfix - do you agree? |
Related: #3849 |
Hi there, We would really like this, but this issue has been open for over a year with no one working on it, Leaving it open is unfortunately making our issue count look higher than it is. I’m going to close this and if someone wants to work on it I’d still be open to a PR! Cheers! |
It would be nice to call saltutil.clear_cache after finishing provisioning - this would clear out the salt minion cache in /var/cache/salt/minion .
Now I have to add this in my Vagrantfile:
config.vm.provision :shell, :inline => "salt-call saltutil.clear_cache"
The text was updated successfully, but these errors were encountered: