smoeding / puppet-sendmail

Manage the Sendmail MTA using Puppet
BSD 2-Clause "Simplified" License
1 stars 12 forks source link

auto-include access_db feature when using sendmail::access::entry? #12

Closed decibelhertz closed 7 years ago

decibelhertz commented 7 years ago

I presently need to do add a sendmail::mc::feature this to get sendmail::access::entry to work, E.G.:

    sendmail::mc::feature { 'access_db': }
    sendmail::access::entry { 'Try_TLS:': value => 'NO' }

It took me a while to figure out, so in the interest of saving others time, I'll ask: should sendmail::access::file contain sendmail::mc::feature { 'access_db': } (or ensure_resource('sendmail::mc::feature','access_db')) in order to avoid that? My initial take is that if you're setting something in the access_db, you want it working automatically, but I may be missing some context.

smoeding commented 7 years ago

I thought about this and decided to do it the way it is currently implemented:

Maybe an update to the README should be the first step.

decibelhertz commented 7 years ago

Sure. A README example would do just fine. I can do a PR or leave it you.

decibelhertz commented 7 years ago

I don't have a strong feeling about changing this, but for completeness: I knew there was a reason I wanted the auto-include. Its because Puppet Labs does something like that in their Apache module. If you call certain features, it auto-includes the modules to make them work. See https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/vhost.pp#L318-L342 for an example.