Mike Lancaster
2009-Jun-25 16:05 UTC
[Puppet Users] Ensure overriden service after exec has run
Hi, How do I force my Service declaration (with is defined elsewhere and inherited) is run after an exec has run? The code; class autofs_nis::services inherits services::base { Service[''ypbind''] { ensure => running, enable=> true, } ..... } class autofs_nis::exec inherits services::base { exec { "setdomainname": command => "domainname blanked", path => "/bin", unless => "[[ $(domainname) == \"blanked\" ]]", } } Open to suggestions to do this differently. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Mike Lancaster
2009-Jun-26 09:20 UTC
[Puppet Users] Re: Ensure overriden service after exec has run
My original email didn''t explain my problem very well. I''m just looking for a bit of advice on how to implement the following; How do I force my Service declaration (which is defined elsewhere and inherited) to run after an exec has run? ypbind is already defined as a service elsewhere so I inherit the class it''s defined in and override it to be running. This should only happen after the exec below has run. class autofs_nis::services inherits services::base { Service[''ypbind''] { ensure => running, enable=> true, } ..... } class autofs_nis::exec { exec { "setdomainname": command => "domainname blanked", path => "/bin", unless => "[[ $(domainname) == \"blanked\" ]]", } } I''ve tried inheriting two classes but that doesn''t work. I''ve looked for before parameters on the exec - there isn''t one. I''ve looked for after on the service - there isn''t one. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Brice Figureau
2009-Jun-26 09:34 UTC
[Puppet Users] Re: Ensure overriden service after exec has run
On Fri, 2009-06-26 at 02:20 -0700, Mike Lancaster wrote:> My original email didn''t explain my problem very well. > I''m just looking for a bit of advice on how to implement the > following; > > How do I force my Service declaration (which is defined elsewhere and > inherited) to run after an exec has run? > > ypbind is already defined as a service elsewhere so I inherit the > class it''s defined in and override it to be running. This should only > happen after the exec below has run. > class autofs_nis::services inherits services::base { > Service[''ypbind''] { > ensure => running, > enable=> true,require => Exec["setdomainname"]> } > ..... > } > > class autofs_nis::exec { > exec { "setdomainname": > command => "domainname blanked", > path => "/bin", > unless => "[[ $(domainname) == \"blanked\" ]]", > } > } > > I''ve tried inheriting two classes but that doesn''t work. > I''ve looked for before parameters on the exec - there isn''t one.There is one. All types understand meta-parameters.> I''ve looked for after on the service - there isn''t one.It''s called require, not after. Have a look to the meta-parameter documentation: http://reductivelabs.com/trac/puppet/wiki/TypeReference#available-metaparameters -- 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Seemingly Similar Threads
- CentOS 6 and NIS not working
- Kickstart, package always selected
- Delete ypbind.........dependancy headaches.. yp-tools is needed by (installed) ypbind
- how to force a cycle package dependancy
- Rails3: jquery-rails gem sets 'config.action_view.javascript_expansions' but cannot be overriden in 'config/application.rb'