docker::run: Add service_provider param to override OS detection #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know support for Gentoo in this module was dropped when it moved into the puppetlabs space. That said, it is still the easiest way to get Docker up and running on Gentoo with just a few extra parameters:
where the
mine/docker/systemd-overrides.conf.erb
template contains:Unfortunately, the
docker::run
type detects that it is running on Gentoo and sets things up for OpenRC. Gentoo has first class support for systemd and I'd like to be able to tell the run type to usesystemd
, just as I do withClass[docker]
via theservice_provider
parameter.This pull request adds a
service_provider
parameter to thedocker::run
type which can be set to override the operating system detection. It can be set tosystemd
to enable systemd support. If it is set to anything else, or it is unset (the default), then the type falls back to the OS detection behavior that was there before.The default behavior of the type is unchanged.
I have added rspec tests to validate this behavior.
This pull request also contains a couple of trivial variable definitions in default cases that were left undefined on non-RedHat and Debian systems.