Re: [Puppet-dev] flush after all resources are synced

2014-03-07 Thread Trevor Vaughan
You'd have to run through the entire catalog of resources in that case. It would certainly work, but I'm not sure if it would actually do what you want. Trevor On Fri, Mar 7, 2014 at 10:37 AM, badgerious wrote: > I should clarify my suggestion to say 'single @ class variable' with an > attr_ac

Re: [Puppet-dev] flush after all resources are synced

2014-03-07 Thread badgerious
I should clarify my suggestion to say 'single @ class variable' with an attr_accessor rather than 'double @@ class variable', the former of which avoids some of the complications Trevor mentioned. (You could of course put the variable in any number of globally accessible places). Eric On Thurs

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Jeff McCune
OK, if naming is going to get some discussion then we should probably start a different thread as to not hijack this one. I'll start that, please reply to the naming discussion at: https://groups.google.com/forum/#!topic/puppet-dev/8j2IjZ1Ilog Sorry for the temporary hijack. -Jeff -- You recei

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Nan Liu
On Mar 6, 2014, at 21:27, Jeff McCune wrote: On Thu, Mar 6, 2014 at 7:21 PM, Jeff McCune wrote: > If so, is it worth renaming it sooner rather than later? > Or is it worth renaming at all? I didn't mean to assume that part. Yeah, agree with renaming it. I have some horrible monkey patch that

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Jeff McCune
On Thu, Mar 6, 2014 at 7:21 PM, Jeff McCune wrote: > If so, is it worth renaming it sooner rather than later? > Or is it worth renaming at all? I didn't mean to assume that part. -Jeff -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Jeff McCune
On Thu, Mar 6, 2014 at 11:23 AM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > Hi Erik, > > On 06.03.2014 09:28, Erik Dalén wrote: > > Isn't this what was done in http://projects.puppetlabs.com/issues/3946 ? > > So should be available in 3.4.0+ > > > > Was discussed in this mail > > th

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Trevor Vaughan
+1 to this idea from Eric. However, be VERY careful that you don't end up stepping on data across runs. You'll need to clear that variable at each start and, if you use a class variable, you'll need to make sure that they're all unique across ALL types. Trevor On Thu, Mar 6, 2014 at 5:59 PM, ba

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread badgerious
Not sure if this will work as expected for your custom type, but a thought might be to set some (provider) class variable in #flush and then, in ::post_resource_eval, check if this variable is set and do the restart (so each flush does no actual work other than setting the flag). Eric On Thurs

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Stefan Schulte
Hi Erik, On 06.03.2014 09:28, Erik Dalén wrote: > Isn't this what was done in http://projects.puppetlabs.com/issues/3946 ? > So should be available in 3.4.0+ > > Was discussed in this mail > thread: https://groups.google.com/forum/#!topic/puppet-dev/Iqs5jEGfu_0 thanks for finding the ticket and

Re: [Puppet-dev] flush after all resources are synced

2014-03-06 Thread Erik Dalén
Isn't this what was done in http://projects.puppetlabs.com/issues/3946 ? So should be available in 3.4.0+ Was discussed in this mail thread: https://groups.google.com/forum/#!topic/puppet-dev/Iqs5jEGfu_0 On 6 March 2014 00:54, Stefan Schulte wrote: > Hello, > > is there a way for a custom provi

[Puppet-dev] flush after all resources are synced

2014-03-05 Thread Stefan Schulte
Hello, is there a way for a custom provider to define a method that flushes resources afer *all* resources are processed? I have a custom type to manage configuration aspects of a specific application and I need to restart that application for configuration changes to take effect. If I define a f