I like your module a lot and I would love to use it for our environment. Since we're using both Ubuntu and FreeBSD I see a few changes which I would need. Would you be open to these? I'd be happy to send a pull request your way.
Those would the changes that need to be made (for FreeBSD only):
- The root user's group needs to be
wheel
- The sudoers file needs to be
/usr/local/etc/sudoers
- The
sudoers.d folder needs to be /usr/local/etc/sudoers.d
- The
visudo command is found at /usr/local/sbin/visudo
In my opinion this would have to be solved with a config class which contains os-specific variables. Those variables would then be re-used in other parts of the module.
For example:
class sudo::os_specific {
$sudoers_file = $::osfamily ? {
'FreeBSD' => '/usr/local/etc/sudoers',
default => '/etc/sudoers',
}
}
And elsewhere:
file { $sudo::os_specific::sudoers_file :
...
What do you think. Would you be interested in having this change added and if so, do you agree with the approach?
I like your module a lot and I would love to use it for our environment. Since we're using both Ubuntu and FreeBSD I see a few changes which I would need. Would you be open to these? I'd be happy to send a pull request your way.
Those would the changes that need to be made (for FreeBSD only):
wheel/usr/local/etc/sudoerssudoers.dfolder needs to be/usr/local/etc/sudoers.dvisudocommand is found at/usr/local/sbin/visudoIn my opinion this would have to be solved with a config class which contains os-specific variables. Those variables would then be re-used in other parts of the module.
For example:
And elsewhere:
What do you think. Would you be interested in having this change added and if so, do you agree with the approach?