Issue #7217 has been updated by Ben Hughes.
Status changed from Unreviewed to Accepted
For now, the ugly work around would be something like:
<pre>
file { '/tmp/test':
ensure => file,
content => template( regsubst( '/tmp//iamatemplate.erb' , '//+' , '/' , 'G'
) ),
}
</pre>
Which is ugly, but still, it works.
----------------------------------------
Bug #7217: double slashes error in template path
https://projects.puppetlabs.com/issues/7217
Author: stéphane travassac
Status: Accepted
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.7
Keywords:
Branch:
hello,<br>
When I include a template (content => template) with double slashes in his
path, Puppet cause an error
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could
not find template
'/etc/puppet/manifests/rs4repo/files/config**//**adm/dev/deploy/hosts.debian.tpl'
at /etc/puppet/manifests/rs4repo/classes/common/hosts.pp:18 on node
XXXXXXXXXXXXX
I can fix the problem by changing the line: <br>
if template == File.expand_path(template) <br>
by <br>
if template = File.expand_path(template) <br>
in file /usr/lib/ruby/1.8/puppet/parser/files.rb (line 37)<br>
Is template path must have only single slash ? if false this fix looks good ?
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.