I'm learning puppet and read the docs. My understanding is that
classes are for generic services (singleton, need only once) while
definitions are for repetitive calls (like functions). My question is
say setting up a web server and ask the conf to listen to only a
specific IP. Which should I use?
class apache {
file { "httpd.conf": content => template('mywebserver.conf.erb') }
}
Usage:
$web_ip = "192.168.2.100"
include apache
or this?
define fnApache($web_ip) {
file { "httpd.conf": content => template('mywebserver.conf.erb') }
}
Usage: fnApache { "config-httpd": web_ip => '192.168.2.100' }
For me, the definition method is clearer (you see/know it is passing
the param).
Thanks
--
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.