On Wed, Oct 31, 2012 at 9:19 AM, Derick Winkworth <[email protected]> wrote: > Puppet seems geared towards managing hosts where changes can be pushed > atomically. What I mean is, suppose some class required another class... > an application requires a file to exist. You can actually make that file > first on the target host and then install or change the application. > > I'm trying to deal with a host that only permits changes in batches. > Effectively all the changes are put into a "window" and then the window is > committed. Something on the backend (separate from puppet) in the host > handles the ordering of the individual elements. > > What is the best way of dealing with this in Puppet? We don't want to > expose the final "commit" to the person building manifests for hosts.. we > want to reuse those abstractions on other platforms that don't use a change > window.
Just build resources to queue the changes and not flush it. This will cause the resource output to be a bit misleading, since you are queueing the change and the system hasn't updated yet. As long this doesn't create unintended side effect you should be ok. > Obviously, we're going to build a provider. We can't embed a commit into > every atomic element (committing a window, no matter how big or small takes > too long), we just want to ensure that whenever configuration state is > modified for this host, all changes are put into the window and then a > single final commit is executed.. If you are building resources, you can implement flush method per resource. I'm not aware hooks for doing something at the end for a resources type. I'm assuming you are looking at something like commit, and the sensible thing is make commit a resource and have it autorequire all other resource type so it executes last. Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
