puppet-samba icon indicating copy to clipboard operation
puppet-samba copied to clipboard

Implement free-form smb.conf options

Open erik-smit opened this issue 12 years ago • 5 comments

erik-smit avatar Feb 18 '13 12:02 erik-smit

Example: class {'samba::server': options => { 'hosts deny' => 'ALL', 'hosts allow' => '1.2.3.4 4.3.2.1' } }

erik-smit avatar Feb 18 '13 12:02 erik-smit

This looks good; I'm not necessarily against this approach, but I'm wondering if it would be better to just implement these and other missing options outright. It would be more strict and prevent malformed configs. Can you think of a reason not to just implement the options directly?

ajjahn avatar Feb 18 '13 22:02 ajjahn

Sorry, I missed your response.

The reason I implemented this is because hardcoded parameters turn the job "Add paramater X to server Y" from a 1 minute singleline commit in my internal puppet repository into:

  • Fork third-party repo
  • Modify git submodule path
  • Modify third-party code
  • Test code
    • Create PR
    • Monitor PR
  • If PR gets picked up quickly, unfork, unmodify git submole
  • If PR doesn't get picked up quickly, maintain fork.
  • etc...

Look at things like https://github.com/example42/puppet-dnsmasq/blob/master/manifests/init.pp#L706

I see this as a lot of work with questionable benefits.

For strictness and forming, maybe augeas already does this. If not, testparm could be considered.

erik-smit avatar Jan 15 '14 01:01 erik-smit

Yeah, I've dealt with that before. I'll reopen and look at getting something like this implemented for special cases. I would, however, like to build in any commonly used options whenever possible.

ajjahn avatar Jan 16 '14 00:01 ajjahn

Check out https://github.com/arioch/puppet-percona#using-percona-hashes to see a well-implemented option hash.

erik-smit avatar Jan 17 '14 14:01 erik-smit