Hello,


Looks like the concat module may do the job?



$my_template = '/my/config.file'

concat { $my_template:

}



concat::fragment { 'standard contents':

  target => $my_template,

  content => template('my.epp'),

}



And then in the Amavis profile class:



concat::fragment { 'extra special contents':

  target => $my_template,

  content => '/var/lib/amavis',

}



Add any other fragments you'd like, and of course any other options you need. 
See https://forge.puppet.com/puppetlabs/concat



 


-----Original message-----
From: Helmut Schneider <[email protected]>
Sent: Monday 22nd July 2019 15:48
To: [email protected]
Subject: Re: [Puppet Users] [EPP] Using tagged, defined, a better way to create 
variables, ... to verify if a class is included


Christopher Wood wrote:

> Top post, I'm not skilled enough to read this hence not sure where I'd
> interject. You may be better off using simpler constructs so that
> people with a wider variety of skill levels in your organization can
> contribute.
> 
> What problems are you encountering where describing state is not
> sufficient to correctly configure a host?

I need to put "/var/amavis" into a configuration file (only) if amavisd
is installed. So I'm either looking for a way to do a lookup with
wildcards

$roleClasses = lookup({"name" => "role_details.*.*.classes", "merge" =>
"deep", "default_value" => undef})
[...]
<% if !empty(grep($roleClasses, "amavisd")) { -%>

or to pass tags to an epp template:

<% if tagged("amavisd") %>

If I put "/var/amavis" into this configuration file and amavisd is not
installed it throws an error.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/xn0lwqkg17nfd95001%40news.gmane.org.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/zarafa.5d35c154.13bc.3b6adc4113070289%40anjie.dontpanic.nl.

Reply via email to