Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD STABLE distribution not correctly parsed #34770

Merged

Conversation

berenddeboer
Copy link
Contributor

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 and ansible_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
  • Bugfix Pull Request
COMPONENT NAME

setup module, but touches only distribution.py.

ANSIBLE VERSION
ansible 2.4.2.0 (freebsd-distribution-version-fix 4de7d4da23) last updated 2018/01/12 11:33:40 (GMT +1300)
  config file = None
  configured module search path = [u'/home/berend/src/ansible/library']
  ansible python module location = /home/berend/src/ansible/lib/ansible
  executable location = /home/berend/src/ansible/bin/ansible
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]
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:

ansible -u root -e ansible_python_interpreter=/usr/local/bin/python2.7 -m setup 35.153.133.47 | grep version

will return incorrect results against STABLE distribution.

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 11, 2018
@Akasurde
Copy link
Member

Closing and re-opening to re-trigger the CI. Failure seems to be irrelevant to patch.

@Akasurde Akasurde closed this Jan 12, 2018
@Akasurde Akasurde reopened this Jan 12, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jan 12, 2018
@Akasurde Akasurde requested a review from alikins January 12, 2018 04:29
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jan 12, 2018
@maxamillion maxamillion merged commit 1f539e6 into ansible:devel Jan 15, 2018
@berenddeboer berenddeboer deleted the freebsd-distribution-version-fix branch January 16, 2018 22:41
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants