Hi all,
I'm getting crazy with this... I have some templates where I use
has_variable? with no problem. But now I have problems in new one.
nods.pp
node 'my_node' {
$CVMFS_mountpoint = "/mnt/cvmfs"
$CVMFS_file = "/etc/auto.cvmfs"
[...]
include some_class_that_already_includes_autofs_class
}
[...]
'/etc/auto.master.test':
content => template('computing_autofs/auto.master.erb');
[...]
auto.master.erb
/nfs file:/etc/auto.home
-rw,hard,intr,tcp,async,rsize=32768,wsize=32768,timeo=600
<% if has_variable?("CVMFS_mountpoint") and has_variable?("CVMFS_file") %>
<%= CVMFS_mountpoint %> <%= CVMFS_file %>
<% end %>
This gives :
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed
to parse template computing_autofs/auto.master.erb: uninitialized constant
Puppet::Parser::TemplateWrapper::CVMFS_mountpoint at
/etc/puppet/manifests/services/workernode/modules/computing_autofs/manifests/init.pp:35
If I change :
<%= CVMFS_mountpoint %> <%= CVMFS_file %>
for some static text (like KK), the templae works as expected:
# cat /etc/auto.master.test
#Autofs file
/nfs file:/etc/auto.home
-rw,hard,intr,tcp,async,rsize=32768,wsize=32768,timeo=600
KK
and removes KK if I remove some of the above defined vars....
So, why is it complaining about the uninitilized constant if it's
defined? and why it complains if the funtions already does something if
the var is not defined?
Anyone could give me a hand on this?
TIA,
Arnau
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.