> > Your general idea sounds feasible. I see two specific problems in the > example code you posted, however: > > 1. Is the title of the File resource you want to override really > 'resolv.conf'? I mean, it could be if you specified the full path via the > 'path' parameter in the original declaration, but it didn't sound like > that's what you had done. > 2. You do not want plussignment in this case. You want to set the > value of the 'audit' parameter to the scalar value 'all', regardless of > what might have been declared in the parent class. Use the regular > assignment operator for that. > > So what you want might be: > > class audit::resolver inherits resolver::config { > notify{"Running audit on $resolver::params::config_file": } > File["$resolver::params::config_file"] { > audit => all > } > Thanks so resolver::config looks like this:- class resolver::config { file { '/etc/resolv.conf.predhclient': ensure => absent } file { '/etc/resolv.conf': ensure => file, owner => root, group => root, mode => '0644', content => template('resolver/resolv.conf.erb'), require => File['/etc/resolv.conf.predhclient'] } The audit class looks like this:- class audit::resolver inherits resolver::config { File['/etc/resolv.conf'] { audit => all } } There is nothing related to this in the debug logs of a run the notify was put in originally to make sure the class was called which is was. The only thing in this is that the catalog run completes without error. The plus assignment was because it was an addition rather than a replacement. Cheers Paul
> } > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/s5QOGTT2Jc4J. 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.