Sebastien Caps
2009-Jul-28 13:31 UTC
[Puppet Users] automatically choose between a private file and a template file
Hi, I m wondering if is there a way to automatically choose between a private file and a template file for the file content source : so if a private file exist we choose to get the content from it, and if the private file doesn''t exist we get the content from a template. I already do this to choose between "private" or "files" source : # The configuration file file { "/etc/dhcpd.conf": owner => "root", group => "root", mode => 644, source => [ "puppet:///private/etc/dhcpd.conf", "puppet:///dhcpd/etc/dhcpd.conf" ], } but I want to choose between template and private automatically and with the syntax "content" and "source" it not work :/ I have try this but with no luck :/ $private_source = "/var/lib/puppet/private/$domain/$hostname/etc/dhcpd.conf" file { "/etc/dhcpd.conf": owner => "root", group => "root", mode => 644, content => [ template($private_source), template("dhcpd/etc/dhcpd.conf"), ], } any idea ? Note: we use centos 5.3 and puppet 0.24.8 Seb --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---