And to make autoloading work :

...modules/myclass/init.pp
                             /params.pp

hth

Jo

On 11/21/2013 01:00 PM, Felix Frank wrote:
Hi,

comments inline.

On 11/21/2013 12:17 PM, Raj kumar V wrote:
In my module folder, <module/mymodule>

I have 2 files.

init.pp
params.pp

My init code:

class myclass($api_key=$myclass::params::myclassagent_APIkey) inherits
myclass::params{
No need to inherit the params class. I would get rid of that first.

include myclass::params
This is likely needed, although I'm not sure wether
$myclass::params::myclassagent_APIkey will already be available when
puppet encounters the class declaration header.

some code here...

}include myclass

params.pp got:

class myclass::params{
myclassagent_APIkey=' '
}
That looks all right, except for the missing $ on the variable name.

HTH,
Felix



--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer         (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________
Open-Future Phone +32 (0)2/255 70 70
Zavelstraat 72              Fax       +32 (0)2/255 70 71
3071 KORTENBERG             Mobile    +32 (0)474/42 40 73
BELGIUM                     http://www.open-future.be
_________________________________________________________
Next Events:
Puppet Advanced Training | 
https://www.open-future.be/puppet-advanced-training-12-till-14th-november
Zabbix Certified Training | 
http://www.open-future.be/zabbix-certified-training-18-till-20th-november
Zabbix Large Environments Training | 
http://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-10-till-12th-december
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/528DF77E.7080808%40open-future.be.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to