FreeBSD STABLE distribution not correctly parsed #34770
Merged
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.
SUMMARY
setup only parses FreeBSD release versions. I.e. if parses:
11.1-RELEASE
. But FreeBSD also has a STABLE distribution concept, which looks like:11.1-STABLE
.This small patch picks that up so
ansible_distribution_version
andansible_distribution_major_version
are properly set.Else
ansible_distribution_version
will look like:FreeBSD 11.1-STABLE #0 r327519: Wed Jan 3 19:25:44 UTC 2018 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
.And
ansible_distribution_major_version
is not set at all.ISSUE TYPE
COMPONENT NAME
setup module, but touches only
distribution.py
.ANSIBLE VERSION
ADDITIONAL INFORMATION
It's quite common to run the STABLE branch in FreeBSD. As the docs say: "STABLE" is the branch where development continues after a RELEASE, including bug fixes and new features.
Run this command to get the setup:
will return incorrect results against STABLE distribution.