From 40e7c7a210bfd0e5b9bbd24f9c3cf09c3b90182f Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 4 Jan 2019 10:03:56 -0800 Subject: [PATCH] Add a porting guide entry for ansible_distribution facts (#50251) * Add a porting guide entry for ansible_distribution facts Switching away from platform.distro() will cause changes sometimes due to the new code using new sources of information that may be out of sync with the old ones. Just have to make people aware of that and also what we are doing to mitigate it when appropriate. * wordsmithed, added links for new distro backend --- .../fragments/platform-dist-to-nir0s-distro.yaml | 6 ++++-- docs/docsite/rst/porting_guides/porting_guide_2.8.rst | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/changelogs/fragments/platform-dist-to-nir0s-distro.yaml b/changelogs/fragments/platform-dist-to-nir0s-distro.yaml index 56132991773..8671a9d6e68 100644 --- a/changelogs/fragments/platform-dist-to-nir0s-distro.yaml +++ b/changelogs/fragments/platform-dist-to-nir0s-distro.yaml @@ -1,5 +1,7 @@ --- minor_changes: - Python-3.8 removes platform.dist() from the standard library. To maintain - compatibility we've switched to an alternative library, nir0s/distro to - detect the distribution for fact gathering. + compatibility we've switched to an alternative library, nir0s/distro, to + detect the distribution for fact gathering. Distributions facts may change + slightly as nir0s/distro has bugfixes which the standard library's + platform.dist() has lacked. diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst index 927c75adc59..a0ff9d5eb0e 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst @@ -17,7 +17,15 @@ This document is part of a collection on porting. The complete list of porting g Playbook ======== -No notable changes. +Distribution Facts +------------------ + +The information returned for the ``ansible_distribution_*`` group of facts may have changed +slightly. Ansible 2.8 uses a new backend library for information about distributions: `nir0s/distro `_. This library runs on Python-3.8 and fixes many bugs, including correcting release and version names. + +The two facts used in playbooks most often, ``ansible_distribution`` and ``ansible_distribution_major_version``, should not change. If you discover a change in these facts, please file a bug so we can address the +difference. However, other facts like ``ansible_distribution_release`` and +``ansible_distribution_version`` may change as erroneous information gets corrected. Command Line