Questions about puppet classes and parameters

35 views
Skip to first unread message

Rohit

unread,
Oct 23, 2014, 9:47:21 PM10/23/14
to puppet...@googlegroups.com
Hi,

I am looking at ways to configure my puppet module (which justs uses another module from puppet forge) to set configuration data. What I want to do is this:

I have a puppet module called 'testing' and created class testing::haproxy in it. I basically want to use this class to setup all configuration parameters which puppetlabs-haproxy module supports - like setting up default options, global options, frontends and backends. I am not sure on how to set haproxy variables/parameters in my 'testing' module.

I just got started with puppet and looking for some direction regarding this. BTW, I am running open source puppet.

Thanks for your help in advance.

Regards,
Rohit

liu.cy

unread,
Oct 24, 2014, 12:20:55 PM10/24/14
to puppet...@googlegroups.com
in general, /etc/puppet/manifests/site.pp is the entry point of puppet manifests, the content always be [import 'nodes/*.pp'].
create pp file in /etc/puppet/manifests/nodes directory to save your all node definitions.
node definition contains variables, expressions, classes. it defines which function should run in your servers, like nginx, memcached or tomcat. and the port that your want your application listen, memory size or other parameter it use. pass it to the classes which do the actually things.

the nginx class contains package, service, file resources, accept assigned parameters do the installation, configuration steps.(actually it ensure nginx package is installed and nginx service is running)

is that ok for you?

ps: excuse my syntax, I'm Chinese.
Reply all
Reply to author
Forward
0 new messages