Hi,
I fell into the same trap  as Stefan in expecting includes defined in
nodes.pp and templates.pp to be run in the order they appear in the file. It
seems there's a certain amount of radomness regarding the running order
which has been fixed by Mike's suggestion require class statements

eg within the squid class   adding the line require => Class["apache"]

Paul

2008/12/16 Mike Renfro <[email protected]>

>
> On 12/16/2008 9:11 AM, Stefan Wiederoder wrote:
>
> > how can I make sure that puppet will execute my includes in
> > predictable manner? (to make sure the dependencies are satisfied)
>
> For resources that need to be done in a particular order, specify
> dependencies with the 'require' and/or 'before' metaparameters --
>
> http://reductivelabs.com/trac/puppet/wiki/TypeReference#available-metaparameters
>
> Example (from when I needed to install the Debian Sun JRE package, and
> agree to its licensing by installing a preseed file for the questions
> the package would ask):
>
> class jre5 {
>   package { "sun-java5-jre":
>     require      => File["/var/cache/debconf/jre5.seeds"],
>     responsefile => "/var/cache/debconf/jre5.seeds",
>     ensure       => latest;
>   }
>
>   file { "/var/cache/debconf/jre5.seeds":
>     source => "puppet:///jre5/jre5.seeds",
>     ensure => present;
>   }
> }
>
> This ensures that the contents of /var/cache/debconf/jre5.seeds is
> pulled down before the sun-java5-jre package is installed.
>
> --
> Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
> 931 372-3601 / Tennessee Technological University
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to