hi all,

I have a module in my test environment as follows :

/etc/puppetlabs/code/environment/test/site/profiles/manifests/userdb/

-> db.pp

-> authorized_keys.pp

-> mkuser.pp

-> mkgroup.pp 

 

within authorized_keys.pp I define a template as follows :

content => template("${module_name}/userdb/gen_auth_keys.erb"),


the template is located at :

 
/etc/puppetlabs/code/environment/test/site/profiles/templates/userdb/gen_auth_keys.erb
 


- the head of the template is as follows :

<%=
mod=Puppet::Module.find "userdb::db"
#
raise("cannot find userdb module") unless mod
#puts mod.path

keyDir=mod.path+"/profiles/files/userdb/public_keys"
#puts keyDir


the template can be found during a puppet run however parsing the template 
fails with cannot find module userdb. 

I am getting confused with defining my module within a modules/profiles 
setup

Could anyone please explain the first line to me and how I should be 
defining the module (path) within this template? mod=Puppet::Module.find 
"userdb::db"


Error message :
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Evaluation Error: Error while evaluating a Resource Statement, Evaluation 
Error: Error while evaluating a Function Call, Failed to parse template 
profiles/userdb/gen_auth_keys.erb:
  Filepath: 
/etc/puppetlabs/code/environments/test/site/profiles/templates/userdb/gen_auth_keys.erb
  Line: 4
  Detail: cannot find userdb module
 at 
/etc/puppetlabs/code/environments/test/site/profiles/manifests/userdb/authorized_keys.pp:50:18
 
at 
/etc/puppetlabs/code/environments/test/site/profiles/manifests/userdb/db.pp:63 
on node xxxx.racqgroup.local


-- 
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/077e924b-ad95-41fa-be98-99621a329eae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to