- 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