On 20.08.2012, at 23:08, Sean Carolan wrote: >>> It's not really the cleanest-looking thing, but the easiest option for >>> your particular case is to wrap the file resource in an if statement >>> like this: >>> if (! $::security_limits_disabled) { >>> file { '/etc/security/limits.conf': >>> ... >>> } >>> } >> >> Thanks, this is just what I was looking for. > > One last question, is it possible to do this: > > class profile::server::java { > $security_limits_disabled = true > } > > and then simply include that class on my target node? I tried to do > this but the file is still getting overwritten... >
In this case you need to add the scope to the variable used in the if clause: if ( ! $profile::server::java::security_limits_disabled) { ........ <- add class name as scope hth, Martin -- 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.