Hello, i am new to puppet and have a question. Could it be that the Type Reference [1] for "file" is incomplete? I am missing the "require" statement, because sometimes you want copy the file, after the package was installed. For example: # /etc/puppet/modules/motd/manifests/init.pp class motd { package { "cowsay": ensure => present, } file { "/etc/init.d/bootmisc.sh": source => "puppet:///modules/motd/bootmisc.sh", owner => "root", group => "root", mode => 0755, require => Package["cowsay"], } } # vim: tabstop=3 Regards, Dennis [1] http://reductivelabs.com/static_files/TypeReference.html
On Thu, Jan 21, 2010 at 3:54 AM, Dennis Hoppe < dennis.hoppe@debian-solutions.de> wrote:> Hello, > > i am new to puppet and have a question. Could it be that the Type Reference > [1] for "file" is incomplete? I am missing the "require" statement, because > sometimes you want copy the file, after the package was installed. > >Hi Dennis. The reason it''s not listed in the file resource docs is because it''s a metaparameter that applies to all resource types. http://reductivelabs.com/static_files/TypeReference.html#available-metaparameters> For example: > > # /etc/puppet/modules/motd/manifests/init.pp > > class motd { > package { "cowsay": > ensure => present, > } > > file { "/etc/init.d/bootmisc.sh": > source => "puppet:///modules/motd/bootmisc.sh", > owner => "root", > group => "root", > mode => 0755, > require => Package["cowsay"], > } > } > > # vim: tabstop=3 > > Regards, Dennis > > [1] http://reductivelabs.com/static_files/TypeReference.html > >-- nigel -- 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.
Require is a metaparameter, and it works on all types, even on defines. See http://docs.reductivelabs.com/references/stable/metaparameter.html for more details and other metaparameters. Silviu On 01/21/2010 01:54 PM, Dennis Hoppe wrote:> Hello, > > i am new to puppet and have a question. Could it be that the Type > Reference [1] for "file" is incomplete? I am missing the "require" > statement, because sometimes you want copy the file, after the package > was installed. > > For example: > > # /etc/puppet/modules/motd/manifests/init.pp > > class motd { > package { "cowsay": > ensure => present, > } > > file { "/etc/init.d/bootmisc.sh": > source => "puppet:///modules/motd/bootmisc.sh", > owner => "root", > group => "root", > mode => 0755, > require => Package["cowsay"], > } > } > > # vim: tabstop=3 > > Regards, Dennis > > [1] http://reductivelabs.com/static_files/TypeReference.html >-- 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.
Hello Nigel, Hello Silviu, Silviu Paragina schrieb:> Require is a metaparameter, and it works on all types, even on defines. > See http://docs.reductivelabs.com/references/stable/metaparameter.html > for more details and other metaparameters.i am sorry. That must be one of the docs i have missed. ;) Regards, Dennis