On Wed, Jun 15, 2011 at 07:48:50PM -0700, Ashley Gould wrote: > > On Wed, Jun 15, 2011 at 06:13:52PM +0100, Ken Barber wrote: > > Certainly works for me in a simplified example ... can you simplify > > your example so it just does a notify? > > > > class firewall_extras ( > > $services = undef, > > ) { > > notify { "msg": message => $services } > > } > > > > class myfirewall { > > class { "firewall_extras": services => $::firewall_services } > > } > >
Ok, I did finally get a basic parameterized class to work from dashboard ENC: class firewall_extras($tcp_ports) { notify { "msg": message => $tcp_ports, } } class firewall_wrapper { class { "firewall_extras": tcp_ports => $::fw_tcp_ports, } } --- agould@pmlab02-vhost:/data/puppet/production> /usr/share/puppet-dashboard/bin/external_node unxslet01.ucop.edu --- name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse unxslet01:~ # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273566' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: Finished catalog run in 7.64 seconds But what I really want is to use a param class to override variables in a base class. Below is a stripped version. the value for the param I set in dashboard shows up in the override class but never makes it to the base class. # Base class # class firewall { define firewall_conf ( $fw_services_ext_tcp = "22" ) { file { "/etc/sysconfig/SuSEfirewall2": content => template("firewall/SuSEfirewall2.erb"), } notify { "msg1": message => $fw_services_ext_tcp, } } # Implement default firewall setup firewall_conf {"default": } } # Override class # class firewall_override ( $tcp_ports ) inherits firewall { # modify default firewall setup Firewall::Firewall_conf["default"] { fw_services_ext_tcp => $tcp_ports, } notify { "msg0": message => $tcp_ports, } } # Wrapper class for Dashboard # class firewall_wrapper { class { "firewall_override": tcp_ports => $::fw_tcp_ports, } } agould@pmlab02-vhost:/data/puppet/production> /usr/share/puppet-dashboard/bin/external_node unxslet01.ucop.edu --- name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse - firewall unxslet01:~ # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273896' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: 22 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22' notice: Finished catalog run in 6.76 seconds -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.