Douglas Garstang wrote:

On Mon, Mar 22, 2010 at 7:15 PM, Ohad Levy <ohadl...@gmail.com> 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 functionality, because I really
really need it.

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;
    }

Unfortunately, the file() function requires paths to be specified with
an absolute path, and doesn't look up paths either via the fileserver.conf
modules (like puppet:/// URLs do), or modules in your manifests (like the
template() function do).  So, it can be done, but it's not very nice.


        /Bellman

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to