add rocky to list of rhel-based distros for configuration defaults #99
+4
−4
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.
Description
Found that when trying to use this cookbook while experimenting with rocky linux it fails for a null value being passed to a resource (I.e. its
name
value). This PR just fixes the case where a node's platform isrocky
Context
When using the library methods for getting default values for the
osquery_daemon
,osquery_config_path
,osquery_packs_path
andosquery_file_group
there is a switch statement on the nodes ohai definedplatform
value.And so for any platform outside of
centos
,ubuntu
,redhat
, andamazon
distributions there is no value passed to the underlying resources such as hereWhile it is possible to override the functions to variables when using the cookbook resource directly, doing so does not appear to override the rest of the methods internally and so I've just updated the functions to provide the same response for
rocky
as it would for any of the other distributions.Additionally it might be nice to default to a sane value in cases where the
platform
does not match, but I am not sure what a goo value for that might be, or if it would be better to just throw a named error.