Skip to content

Add support for FreeBSD #41

@href

Description

@href

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions