Hello puppet-users, I´ve setup a site.pp with only a default node - which has 15 to 20 includes. how can I make sure that puppet will execute my includes in predictable manner? (to make sure the dependencies are satisfied) for example, I´d first like to setup yum - then install a few needed packages, add users and so on. How can I do that? do I have to name the includes aaa/aab/aac or 1_yum/2_packages/3_users ? thanks , Stefan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
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 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 -~----------~----~----~----~------~----~------~--~---
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 <renfro@tntech.edu>> > 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 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 -~----------~----~----~----~------~----~------~--~---
Stefan Wiederoder
2008-Dec-18 13:46 UTC
[Puppet Users] Re: site.pp > include execution order
On 18 Dez., 12:57, "paul matthews" <paulsmatth...@googlemail.com> wrote:> 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"] > > Paulthanks Paul for your advice, I´ll give it a try --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---