Do not set a value for the collectd_version fact if collectd is not y… #668
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.
…et installed
Right now the value of that fact is set to an empty string when collectd is not installed, so on an initial run on a new machine the code in init manifest
will set $collectd_version_real to an empty string, and as a result, on an initial run the modules that have templates that reference this value will be broken. Not setting this value in the fact will make $collectd_version_real to take the value of $minimum_version which I believe is the intended behaviour. The second run will fix the problem, but it means you must run puppet twice for the initial provisioning.
Another question if should we transform the referenced line in
so that $collectd_version_real will always have the value of $minimum_version if $minimum_version is defined. This will also provide us a (strange) fix for the problem, but I'm not sure if it's the intended behaviour.
I tested if it works :