Hey that does look heck of a lot prettier! Thanks!
On Thu, Apr 12, 2012 at 1:02 PM, Steven King wrote:
> Marek,
>
> I'd suggest using something like the following to use a template based on
> hostname:
>
> file { '/path/to/file':
> template => $hostname ? {
> /regex/ => 'puppet://module
Marek,
I'd suggest using something like the following to use a template based
on hostname:
file { '/path/to/file':
template => $hostname ? {
/regex/ => 'puppet://module/template.erb',
/regex2/ => 'puppet://module/template1.erb',
default=> 'puppet://module/default-template.e
On Thu, Apr 12, 2012 at 11:39 AM, Marek Dohojda wrote:
> Hello
>
> Thank you
> Unfortunately this won't help me at the moment because the files are
> different completely and not just few parameters. I need different
> templates based on hostname.
> I am fully aware that I can use "if" but well.
Hello
Thank you
Unfortunately this won't help me at the moment because the files are
different completely and not just few parameters. I need different
templates based on hostname.
I am fully aware that I can use "if" but well..ahm.. its ugly :)
On Thu, Apr 12, 2012 at 10:53 AM, Gary Larizza
Hey Marek,
Templates do have different functionality here - they will concatenate
arrays of templates (i.e. if you pass more than one template, it
concatenates them all together into one file). You might want to check out
the blog on separating data from code (
http://puppetlabs.com/blog/the-prob
Sorry if this has been asked, but Google has failed me and I haven't been
able to find an answer.
With a source one can declare array so that if file exist puppet will pull
it out first, if not move to the next file in this fashion:
source => ["puppet:///conf/httpd_$hostname.conf",
"