Re: [Puppet Users] String substituion in puppet template

2015-06-01 Thread Björn
Okay, I got it now. <% if @ip_xforward != '' %> <% if ip_xforward.is_a? Array -%> <% ip_xforward.map do |value| -%> <%= "\t\tSetEnvIf X-Forwarded-For ^("

Re: [Puppet Users] String substituion in puppet template

2015-05-22 Thread Henrik Lindberg
On 2015-22-05 11:08, Gabriel Filion wrote: On 20/05/15 09:04 AM, Björn wrote: I tried it with regsubst, but without success: | <%ip_xforward.each do|name|-%><%="\t\tSetEnvIF X-Forwarded-For ^(regsubst(#{name}, '\.','\\.')) AllowIP\n"%><%end-%> | maybe you need to call the function outside of t

Re: [Puppet Users] String substituion in puppet template

2015-05-22 Thread Björn
Am Freitag, 22. Mai 2015 11:09:15 UTC+2 schrieb Gabriel Filion: > > On 20/05/15 09:04 AM, Björn wrote: > > I tried it with regsubst, but without success: > > | > > <%ip_xforward.each do|name|-%><%="\t\tSetEnvIF X-Forwarded-For > > ^(regsubst(#{name}, '\.','\\.')) AllowIP\n"%><%end-%> > > |

Re: [Puppet Users] String substituion in puppet template

2015-05-22 Thread Gabriel Filion
On 20/05/15 09:04 AM, Björn wrote: > I tried it with regsubst, but without success: > | > <%ip_xforward.each do|name|-%><%="\t\tSetEnvIF X-Forwarded-For > ^(regsubst(#{name}, '\.','\\.')) AllowIP\n"%><%end-%> > | maybe you need to call the function outside of the string. e.g.: <%= "\t\tSetEnvIf X

[Puppet Users] String substituion in puppet template

2015-05-20 Thread Björn
Hello, I try to customize my http vhost template and defined and array of ip addresses in the manifests: class apache::webservice( $htdocs = $apache::param::htdocs, $apacheuser = $apache::param::apacheuser, $apachegroup = $apache::param::apachegroup, $logdir = $apache::param::logdir, ) i