diff options
author | Johanan Liebermann <jliebermann@microsoft.com> | 2022-09-07 20:14:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 13:14:12 -0400 |
commit | fbd828673de3d4eed525a982d75ace39a1f9eef1 (patch) | |
tree | 8b0f0571e08db734cedf85f5dc8ddf61b03c348d /hacking | |
parent | 77ba025a1301c62dd945fd0f18153c5eef9a0b77 (diff) | |
download | ansible-fbd828673de3d4eed525a982d75ace39a1f9eef1.tar.gz |
Fix distro fact handling for Flatcar (#77635)
* Fix distro fact handling for Flatcar
The existence of the file /etc/flatcar/update.conf depends on
bootstrap configuration typically provided by the user. For that
reason this file is unsuitable for determining distro facts for
Flatcar Container Linux.
The distribution_release fact is meaningless in the case of Flatcar
since Flatcar doesn't have named releases. The distribution_version
fact, however, IS meaningful and should contain a number such as
"3139.2.0".
- Use /etc/os-release instead of /etc/flatcar/update.conf.
- Drop the distribution_release fact.
- Set the distribution_version fact.
- Update distro test fixture for Flatcar
- Generate the fixture using gen_distribution_version_testcase.py.
- Override result.distribution and result.os_family manually as the
generator script gives wrong values.
- Use a recent Flatcar version.
Signed-off-by: Johanan Liebermann <jliebermann@microsoft.com>
Diffstat (limited to 'hacking')
-rwxr-xr-x | hacking/tests/gen_distribution_version_testcase.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/hacking/tests/gen_distribution_version_testcase.py b/hacking/tests/gen_distribution_version_testcase.py index e520d121a4..2fc5a2f932 100755 --- a/hacking/tests/gen_distribution_version_testcase.py +++ b/hacking/tests/gen_distribution_version_testcase.py @@ -41,7 +41,6 @@ filelist = [ '/etc/altlinux-release', '/etc/os-release', '/etc/coreos/update.conf', - '/etc/flatcar/update.conf', '/usr/lib/os-release', ] |