--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/af002012-5084-48e8-9f61-9fac2b64889e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hello,I apologize in advance if this question is redundant.I'm using puppet version 2.7.11 (because that's what Ubuntu 12.04 LTS has to offer) and I'd like to override a class default parameter with 'undef'. For example, the puppetlabs 'apache' module (version 0.10.0) sets 'ensure => running' for service 'apache' by default. I do not what puppet to attempt starting or stopping apache, so I'm trying the following (which does not work):class {'apache': service_ensure => undef;}The above gives me the default 'ensure => running' for the 'apache' service. Any idea how I can express 'ensure => undef' when declaring the apache class in my manifest?
Could suppose I could always hack the 'apache' module, but would prefer not to.
All class parameters must have values assigned, whether by explicit declaration or by default value (or by automated data binding, but that requires Puppet 3). Undef is not a value. In fact "not a value" is practically its definition. Declaring a class or resource parameter as undef is an explicit expression of not assigning a value.
Check the module documentation, but it sounds like the stock version does not support what you want to do.
service_ensure
Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.
Personally, though, I would look into modifying the module appropriately, then opening an issue against it and contributing your solution. Perhaps you could make an empty value of service_ensure suppress managing the run state of the service.