Re: [Puppet Users] Source and Template file defaults

2010-03-30 Thread Thomas Bellman
Douglas Garstang wrote: On Tue, Mar 23, 2010 at 4:00 AM, Thomas Bellman wrote: You could do it like this: $templ = file("/config/foo/xyzzy.$fqdn.erb", "/config/foo/xyzzy.default.erb") $content = inline_template($templ) file { "/my/file": content => $content;

Re: [Puppet Users] Source and Template file defaults

2010-03-29 Thread Douglas Garstang
On Tue, Mar 23, 2010 at 4:00 AM, Thomas Bellman wrote: > Douglas Garstang wrote: > >> On Mon, Mar 22, 2010 at 7:15 PM, Ohad Levy wrote: > >>> Hmm.. Puppet does not support going over multiple templates like it does >>> in >>> plain files. >>> >>> maybe there is even a feature request for it ;) >>

Re: [Puppet Users] Source and Template file defaults

2010-03-23 Thread Thomas Bellman
Douglas Garstang wrote: On Mon, Mar 22, 2010 at 7:15 PM, Ohad Levy wrote: Hmm.. Puppet does not support going over multiple templates like it does in plain files. maybe there is even a feature request for it ;) Aw crap. I've been told that twice in the last few days. Is there another way

Re: [Puppet Users] Source and Template file defaults

2010-03-22 Thread Ohad Levy
You could probably create your own function, which checks if a file exists and if it does call the template function on it. Ohad On Tue, Mar 23, 2010 at 1:23 PM, Douglas Garstang wrote: > On Mon, Mar 22, 2010 at 7:15 PM, Ohad Levy wrote: > > Hmm.. Puppet does not support going over multiple te

Re: [Puppet Users] Source and Template file defaults

2010-03-22 Thread Douglas Garstang
On Mon, Mar 22, 2010 at 7:15 PM, Ohad Levy wrote: > Hmm.. Puppet does not support going over multiple templates like it does in > plain files. > > maybe there is even a feature request for it ;) Aw crap. I've been told that twice in the last few days. Is there another way I could emulate this fun

Re: [Puppet Users] Source and Template file defaults

2010-03-22 Thread Ohad Levy
Hmm.. Puppet does not support going over multiple templates like it does in plain files. maybe there is even a feature request for it ;) Ohad On Tue, Mar 23, 2010 at 6:34 AM, Douglas Garstang wrote: > Can someone tell me why this works: > > file { >"/etc/sudoers": >source =>

[Puppet Users] Source and Template file defaults

2010-03-22 Thread Douglas Garstang
Can someone tell me why this works: file { "/etc/sudoers": source => [ "puppet://$server/security/etc/sudoers:${fqdn}", "puppet://$server/security/etc/sudoers" ], owner => root, group => root, mode => 440, } but, this doe