[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-06-11 Thread James Turnbull
Rene wrote:
> Does anybody know the status of that patch?
> 

It's pushed and will be in 0.25.0.  The next 0.25.0 release will be
beta2 but I haven't got a date yet.

Regards

James Turnbull

-- 
Author of:
* Pro Linux Systems Administration
(http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet
(http://tinyurl.com/pupbook)
* Pro Nagios 2.0
(http://tinyurl.com/pronagios)
* Hardening Linux
(http://tinyurl.com/hardeninglinux)



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-06-11 Thread Rene

Does anybody know the status of that patch?

On May 29, 10:01 am, Brice Figureau 
wrote:
> On Fri, 2009-05-29 at 08:18 +1000, James Turnbull wrote:
> > Brice Figureau wrote:
> > > On Thu, 2009-05-28 at 11:55 +0200, Peter Meier wrote:
> > >> Hi
>
> > >>> Only way I know is to make individual objects depend on other objects.
> > >>> Can't do it at
> > >>> class level... I think there is a feature request somewhere in the
> > >>> system for this, because
> > >>> I'd like it as well...
> > >> hmm did I only dream that in the upcoming release there will be a  
> > >> require (or something like that) keyword to include a class and  
> > >> require it. Unfortunately I'm not able to find the appropriate bug  
> > >> report.
>
> > > I implemented it for sure, but in the end I think it was rejected:
> > >http://projects.reductivelabs.com/issues/1907
>
> > > Re-reading the thread I see why we rejected the bug, but not the patch.
> > > I think I'll have to resubmit it.
>
> > Yes - had to go re-read myself.  As long as we provide both functions -
> > include and a stronger require - I think this is an easy +1.
>
> Yes, that's what my patch was doing.
> I'll resurrect the patch and post it to puppet-dev this week-end.
> --
> Brice Figureau
> My Blog:http://www.masterzen.fr/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-29 Thread Brice Figureau

On Fri, 2009-05-29 at 08:18 +1000, James Turnbull wrote:
> Brice Figureau wrote:
> > On Thu, 2009-05-28 at 11:55 +0200, Peter Meier wrote:
> >> Hi
> >>
> >>> Only way I know is to make individual objects depend on other objects.
> >>> Can't do it at
> >>> class level... I think there is a feature request somewhere in the
> >>> system for this, because
> >>> I'd like it as well...
> >> hmm did I only dream that in the upcoming release there will be a  
> >> require (or something like that) keyword to include a class and  
> >> require it. Unfortunately I'm not able to find the appropriate bug  
> >> report.
> > 
> > I implemented it for sure, but in the end I think it was rejected:
> > http://projects.reductivelabs.com/issues/1907
> > 
> > Re-reading the thread I see why we rejected the bug, but not the patch.
> > I think I'll have to resubmit it.
> 
> Yes - had to go re-read myself.  As long as we provide both functions -
> include and a stronger require - I think this is an easy +1.

Yes, that's what my patch was doing.
I'll resurrect the patch and post it to puppet-dev this week-end.
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-29 Thread philipp Hanselmann

James Turnbull schrieb:
> Brice Figureau wrote:
>   
>> On Thu, 2009-05-28 at 11:55 +0200, Peter Meier wrote:
>> 
>>> Hi
>>>
>>>   
 Only way I know is to make individual objects depend on other objects.
 Can't do it at
 class level... I think there is a feature request somewhere in the
 system for this, because
 I'd like it as well...
 
>>> hmm did I only dream that in the upcoming release there will be a  
>>> require (or something like that) keyword to include a class and  
>>> require it. Unfortunately I'm not able to find the appropriate bug  
>>> report.
>>>   
>> I implemented it for sure, but in the end I think it was rejected:
>> http://projects.reductivelabs.com/issues/1907
>>
>> Re-reading the thread I see why we rejected the bug, but not the patch.
>> I think I'll have to resubmit it.
>> 
>
> Yes - had to go re-read myself.  As long as we provide both functions -
> include and a stronger require - I think this is an easy +1.
>
> Regards
>
> James Turnbull
>
>   
Yes, that will be great when require for classes comes in.
With this I can much more control, how puppet evaluates the configuration.

Thanks!

Philipp


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread philipp Hanselmann

Junhao schrieb:
> Greg wrote:
>   
>> Only way I know is to make individual objects depend on other objects.
>> Can't do it at
>> class level... I think there is a feature request somewhere in the
>> system for this, because
>> I'd like it as well...
>>
>> Greg
>>
>> On May 27, 9:56 pm, philipp Hanselmann 
>> wrote:
>> 
>>> May somebody has answer ...
>>>
>>> How can I ensure that certain classes get executed on the client side
>>> before the other ones do?
>>>
>>> Have a look on the example:
>>>
>>>  class AA
>>> case  $operatingsystem {
>>>  "redhat": { include AA::do-first }
>>> default: {}
>>> }
>>>   include AA::software
>>>   include AA::desktop
>>>  }
>>>
>>> class AA::do-first {
>>> # do an rhn_register
>>> exec { "register-system":
>>> command => "rm -f /etc/sysconfig/rhn/systemid ; rhnreg_ks
>>> --force --serverUrl=https://$rhn_server/XMLRPC
>>> --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
>>> --activationkey=$activation_key",
>>> logoutput => true,
>>> unless => "/usr/sbin/rhn_check",
>>> tag => register-system,
>>> }
>>>
>>> }
>>> class AA::software {
>>> # do someting after AA::do-first
>>> }
>>> class AA::desktop {
>>> # do something after AA::do-first
>>> }
>>>
>>> For an Redhat system the resource(s) in AA::do-first should run before
>>> the resource(s) in AA::software  & AA::desktop.
>>>
>>> Is their an simple way for that?
>>>
>>> An other wish would be: If Exec "register-system" fails, puppet should
>>> stop his execution without do go through the class AA::software &
>>> AA::desktop.
>>>
>>> Thanks for the help!
>>>
>>> Philipp
>>>   
>
> What about:
>
> module AA:
> class AA {}
> class AA::do-first {
$myvariable
> }
> class AA::software inherits AA::do-first {}
> class AA::desktop inherits AA::do-first {}
>
> node foo:
>   
> node foo {
>  import "AA"
>  include AA::desktop
> }
>
> Junhao
>
>   
Hi Janhao


Even this works, I had issues with the scope of my global defined 
variables, so I decided to replace all my inherits code trough 
include(s). Since than puppet handle my variables like expected.

So not really willing to go back.
I must commit up to date I couldn't understand the advances of using 
class inheritance comparing to include statements ...

class master {
# do something
}
class slave inherits master {
# do something
}

OR

class master {
   # do something
}
class slave {
include master
# do something
}



What are differences execpt to get issues with the variable scope in 
inheritanced classes?

Philipp



> >
>
>   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread James Turnbull
Brice Figureau wrote:
> On Thu, 2009-05-28 at 11:55 +0200, Peter Meier wrote:
>> Hi
>>
>>> Only way I know is to make individual objects depend on other objects.
>>> Can't do it at
>>> class level... I think there is a feature request somewhere in the
>>> system for this, because
>>> I'd like it as well...
>> hmm did I only dream that in the upcoming release there will be a  
>> require (or something like that) keyword to include a class and  
>> require it. Unfortunately I'm not able to find the appropriate bug  
>> report.
> 
> I implemented it for sure, but in the end I think it was rejected:
> http://projects.reductivelabs.com/issues/1907
> 
> Re-reading the thread I see why we rejected the bug, but not the patch.
> I think I'll have to resubmit it.

Yes - had to go re-read myself.  As long as we provide both functions -
include and a stronger require - I think this is an easy +1.

Regards

James Turnbull

-- 
Author of:
* Pro Linux Systems Administration
(http://www.amazon.com/gp/product/1430219122/)
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread Peter Meier

Hi

> yeah I objected because of changing the behaviour of include. But I
> thought that it was implemented with a different keyword, which wouldn't
> change the behaviour of include.
> 
> Something like a "stronger" include and I thought it have been called
> required.
> 
> But maybe I'm wrong.


and rereading it with full concentration I see that it should be called
reuqire. :)

cheers pete

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread Peter Meier

Hi

> I implemented it for sure, but in the end I think it was rejected:
> http://projects.reductivelabs.com/issues/1907
> 
> Re-reading the thread I see why we rejected the bug, but not the patch.
> I think I'll have to resubmit it.

yeah I objected because of changing the behaviour of include. But I
thought that it was implemented with a different keyword, which wouldn't
change the behaviour of include.

Something like a "stronger" include and I thought it have been called
required.

But maybe I'm wrong.

cheers pete

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread Brice Figureau

On Thu, 2009-05-28 at 11:55 +0200, Peter Meier wrote:
> Hi
> 
> > Only way I know is to make individual objects depend on other objects.
> > Can't do it at
> > class level... I think there is a feature request somewhere in the
> > system for this, because
> > I'd like it as well...
> 
> hmm did I only dream that in the upcoming release there will be a  
> require (or something like that) keyword to include a class and  
> require it. Unfortunately I'm not able to find the appropriate bug  
> report.

I implemented it for sure, but in the end I think it was rejected:
http://projects.reductivelabs.com/issues/1907

Re-reading the thread I see why we rejected the bug, but not the patch.
I think I'll have to resubmit it.
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-28 Thread Peter Meier

Hi

> Only way I know is to make individual objects depend on other objects.
> Can't do it at
> class level... I think there is a feature request somewhere in the
> system for this, because
> I'd like it as well...

hmm did I only dream that in the upcoming release there will be a  
require (or something like that) keyword to include a class and  
require it. Unfortunately I'm not able to find the appropriate bug  
report.

cheers pete

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-27 Thread Junhao

Greg wrote:
> Only way I know is to make individual objects depend on other objects.
> Can't do it at
> class level... I think there is a feature request somewhere in the
> system for this, because
> I'd like it as well...
> 
> Greg
> 
> On May 27, 9:56 pm, philipp Hanselmann 
> wrote:
>> May somebody has answer ...
>>
>> How can I ensure that certain classes get executed on the client side
>> before the other ones do?
>>
>> Have a look on the example:
>>
>>  class AA
>> case  $operatingsystem {
>>  "redhat": { include AA::do-first }
>> default: {}
>> }
>>   include AA::software
>>   include AA::desktop
>>  }
>>
>> class AA::do-first {
>> # do an rhn_register
>> exec { "register-system":
>> command => "rm -f /etc/sysconfig/rhn/systemid ; rhnreg_ks
>> --force --serverUrl=https://$rhn_server/XMLRPC
>> --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
>> --activationkey=$activation_key",
>> logoutput => true,
>> unless => "/usr/sbin/rhn_check",
>> tag => register-system,
>> }
>>
>> }
>> class AA::software {
>> # do someting after AA::do-first
>> }
>> class AA::desktop {
>> # do something after AA::do-first
>> }
>>
>> For an Redhat system the resource(s) in AA::do-first should run before
>> the resource(s) in AA::software  & AA::desktop.
>>
>> Is their an simple way for that?
>>
>> An other wish would be: If Exec "register-system" fails, puppet should
>> stop his execution without do go through the class AA::software &
>> AA::desktop.
>>
>> Thanks for the help!
>>
>> Philipp

What about:

module AA:
class AA {}
class AA::do-first {}
class AA::software inherits AA::do-first {}
class AA::desktop inherits AA::do-first {}

node foo:
node foo {
 import "AA"
 include AA::desktop
}

Junhao

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Controlling the order of execution of puppet code?

2009-05-27 Thread Greg

Only way I know is to make individual objects depend on other objects.
Can't do it at
class level... I think there is a feature request somewhere in the
system for this, because
I'd like it as well...

Greg

On May 27, 9:56 pm, philipp Hanselmann 
wrote:
> May somebody has answer ...
>
> How can I ensure that certain classes get executed on the client side
> before the other ones do?
>
> Have a look on the example:
>
>      class AA
>         case  $operatingsystem {
>                  "redhat": { include AA::do-first }
>                     default: {}
>             }
>           include AA::software
>           include AA::desktop
>      }
>
>     class AA::do-first {
>         # do an rhn_register
>         exec { "register-system":
>             command => "rm -f /etc/sysconfig/rhn/systemid ; rhnreg_ks
>     --force --serverUrl=https://$rhn_server/XMLRPC
>     --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
>     --activationkey=$activation_key",
>             logoutput => true,
>             unless => "/usr/sbin/rhn_check",
>             tag => register-system,
>         }
>
>     }
>     class AA::software {
>         # do someting after AA::do-first
>     }
>     class AA::desktop {
>         # do something after AA::do-first
>     }
>
> For an Redhat system the resource(s) in AA::do-first should run before
> the resource(s) in AA::software  & AA::desktop.
>
> Is their an simple way for that?
>
> An other wish would be: If Exec "register-system" fails, puppet should
> stop his execution without do go through the class AA::software &
> AA::desktop.
>
> Thanks for the help!
>
> Philipp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---