Only set up ordering between the config file and the service if we're managing the config file. #672
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.
With latest (3.2.0), if you try use manage_config_file => false, you get an undefined resource for File['mysql-config-file'].
This is because mysql::server::config is conditionally defining that resource, but mysql::server::service is always requiring it.
A different approach to fixing this issue, which arguably has a bit more flexibility for the module end user, would be to leave the code in mysql::server::service as-is, and instead change mysql::server::config so that it always defines a File resource for mysql-config-file, but if manage_config_file is false, it doesn't set any attributes for the File. That allows people to use manage_config_file => false and potentially manage their config some other way, but still have the right ordering for the file and the service resources.