Open petems opened 8 years ago
Thanks! It's great that you found a FreeBSD image to test with :)
Be careful though, sudoers.pp
is still os-specific, with the sudoers.d
directory and visudo
being hardcoded.
The reason why I didn't go with the params pattern was the fact that you now have to duplicate all the parameters in the sudoers definition as well, which goes a bit against DRY. Though my approach has a bit of that as well, so I'm not sure there's a perfect solution.
@href Unfortunately there's no clean way to do this, params is a bit WET but seems to be the common solution.
The only real clean way is the new puppet lookup
command avaliable in Puppet > 4:
https://docs.puppet.com/puppet/latest/reference/lookup_quick_module.html
But that's not backwards compatible...
But yeah, I'm fixing the sudoers specific stuff now 👍
Ok, so the defined type also has the params now, unfortunately it requires you to have the sudo within the catalog to inherit that. I've added a check with an example of what to add to fix that, as long as this is part of a major version bump it should be fine, as it's breaking behaviour for those upgrading.