Hi All I would like to define multiple file sources for a file but with more than one of content, source, target! The goal is to have a template by default for a file but if a specific source file exists for it, then use this source, first. something like: source => [ "puppet://$puppetserver/files/etc/apache2/sites- available/${name}/${hostname}", "puppet://$puppetserver/files/etc/apache2/sites- available/${name}/default", template("apache2/server_virtual_typo3.erb"), # ], This get an error! warning: Configuration could not be instantiated: You cannot specify more than one of content, source, target at ... OK I understand template it''s a content target. But we can not define multiple target in one File definition! ( source => [ ... ] , content => template.... ) How can i solve this problem ? Thanks in advanced Gilbert --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
file { apache-config: source => "puppet://$puppetserver/files/etc/apache2/sites- available/${name}", recurse => true; } http://reductivelabs.com/trac/puppet/wiki/TypeReference#id348 recurse Whether and how deeply to do recursive management. Valid values are true, false, inf. Values can also match /^[0-9]+$/. -Jason On Jan 20, 2:03 pm, robertpluss <robert.pl...@gmail.com> wrote:> Hi All > > I would like to define multiple file sources for a file but with more > than one of content, source, target! > > The goal is to have a template by default for a file but if a specific > source file exists for it, then use this source, first. > > something like: > > source => [ > "puppet://$puppetserver/files/etc/apache2/sites- > available/${name}/${hostname}", > "puppet://$puppetserver/files/etc/apache2/sites- > available/${name}/default", > template("apache2/server_virtual_typo3.erb"), # > ], > > This get an error! > warning: Configuration could not be instantiated: You cannot specify > more than one of content, source, target at ... > OK I understand template it''s a content target. But we can not define > multiple target in one File definition! ( source => [ ... ] , content > => template.... ) > > How can i solve this problem ? > > Thanks in advanced > > Gilbert--~--~---------~--~----~------------~-------~--~----~ 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 jason, Thanks for your reply. But how can i manage template ? I know recurse for one source. Gilbert On Jan 21, 12:02 am, jrojas <jason.r.ro...@gmail.com> wrote:> file { > > apache-config: > source => "puppet://$puppetserver/files/etc/apache2/sites- > available/${name}", > recurse => true; > > } > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#id348 > > recurse > > Whether and how deeply to do recursive management. Valid values are > true, false, inf. Values can also match /^[0-9]+$/. > > -Jason > On Jan 20, 2:03 pm, robertpluss <robert.pl...@gmail.com> wrote: > > > Hi All > > > I would like to define multiple file sources for a file but with more > > than one of content, source, target! > > > The goal is to have a template by default for a file but if a specific > > source file exists for it, then use this source, first. > > > something like: > > > source => [ > > "puppet://$puppetserver/files/etc/apache2/sites- > > available/${name}/${hostname}", > > "puppet://$puppetserver/files/etc/apache2/sites- > > available/${name}/default", > > template("apache2/server_virtual_typo3.erb"), # > > ], > > > This get an error! > > warning: Configuration could not be instantiated: You cannot specify > > more than one of content, source, target at ... > > OK I understand template it''s a content target. But we can not define > > multiple target in one File definition! ( source => [ ... ] , content > > => template.... ) > > > How can i solve this problem ? > > > Thanks in advanced > > > Gilbert--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You can''t have source be a template. Contents can be a template, but source has to come from the file server. On Tue, Jan 20, 2009 at 4:08 PM, robertpluss <robert.pluss@gmail.com> wrote:> > Hi jason, > > Thanks for your reply. But how can i manage template ? > I know recurse for one source. > > Gilbert > > > On Jan 21, 12:02 am, jrojas <jason.r.ro...@gmail.com> wrote: > > file { > > > > apache-config: > > source => "puppet://$puppetserver/files/etc/apache2/sites- > > available/${name}", > > recurse => true; > > > > } > > > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#id348 > > > > recurse > > > > Whether and how deeply to do recursive management. Valid values are > > true, false, inf. Values can also match /^[0-9]+$/. > > > > -Jason > > On Jan 20, 2:03 pm, robertpluss <robert.pl...@gmail.com> wrote: > > > > > Hi All > > > > > I would like to define multiple file sources for a file but with more > > > than one of content, source, target! > > > > > The goal is to have a template by default for a file but if a specific > > > source file exists for it, then use this source, first. > > > > > something like: > > > > > source => [ > > > "puppet://$puppetserver/files/etc/apache2/sites- > > > available/${name}/${hostname}", > > > "puppet://$puppetserver/files/etc/apache2/sites- > > > available/${name}/default", > > > template("apache2/server_virtual_typo3.erb"), # > > > ], > > > > > This get an error! > > > warning: Configuration could not be instantiated: You cannot specify > > > more than one of content, source, target at ... > > > OK I understand template it''s a content target. But we can not define > > > multiple target in one File definition! ( source => [ ... ] , content > > > => template.... ) > > > > > How can i solve this problem ? > > > > > Thanks in advanced > > > > > Gilbert > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---