Skip to content

Add FreeBSD support#45

Open
petems wants to merge 3 commits into
arnoudj:masterfrom
petems:add_freebsd_support
Open

Add FreeBSD support#45
petems wants to merge 3 commits into
arnoudj:masterfrom
petems:add_freebsd_support

Conversation

@petems

@petems petems commented May 12, 2016

Copy link
Copy Markdown
Contributor

@petems petems mentioned this pull request May 12, 2016
@href

href commented May 13, 2016

Copy link
Copy Markdown

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.

@petems

petems commented May 13, 2016

Copy link
Copy Markdown
Contributor Author

@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 👍

@petems

petems commented May 13, 2016

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants