mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix alt linux detection for new versions (#43723)
they dropped the Linux so now it only shows as ALT, it should still be backwards compatible pkg_mgr detection relies on `Altlinux` string, so properly setting os_distribution should take care of it as side effect fixes #43539
This commit is contained in:
parent
37361d9b0b
commit
abe68d523c
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/alternative_facts.yml
Normal file
2
changelogs/fragments/alternative_facts.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- Fix alt linux detection/matching
|
|
@ -57,6 +57,7 @@ class DistributionFiles:
|
||||||
# - have a function get_distribution_DISTNAME implemented
|
# - have a function get_distribution_DISTNAME implemented
|
||||||
# keep names in sync with Conditionals page of docs
|
# keep names in sync with Conditionals page of docs
|
||||||
OSDIST_LIST = (
|
OSDIST_LIST = (
|
||||||
|
{'path': '/etc/altlinux-release', 'name': 'Altlinux'},
|
||||||
{'path': '/etc/oracle-release', 'name': 'OracleLinux'},
|
{'path': '/etc/oracle-release', 'name': 'OracleLinux'},
|
||||||
{'path': '/etc/slackware-version', 'name': 'Slackware'},
|
{'path': '/etc/slackware-version', 'name': 'Slackware'},
|
||||||
{'path': '/etc/redhat-release', 'name': 'RedHat'},
|
{'path': '/etc/redhat-release', 'name': 'RedHat'},
|
||||||
|
@ -72,7 +73,6 @@ class DistributionFiles:
|
||||||
{'path': '/etc/os-release', 'name': 'Debian'},
|
{'path': '/etc/os-release', 'name': 'Debian'},
|
||||||
{'path': '/etc/lsb-release', 'name': 'Debian'},
|
{'path': '/etc/lsb-release', 'name': 'Debian'},
|
||||||
{'path': '/etc/lsb-release', 'name': 'Mandriva'},
|
{'path': '/etc/lsb-release', 'name': 'Mandriva'},
|
||||||
{'path': '/etc/altlinux-release', 'name': 'Altlinux'},
|
|
||||||
{'path': '/etc/sourcemage-release', 'name': 'SMGL'},
|
{'path': '/etc/sourcemage-release', 'name': 'SMGL'},
|
||||||
{'path': '/etc/os-release', 'name': 'NA'},
|
{'path': '/etc/os-release', 'name': 'NA'},
|
||||||
{'path': '/etc/coreos/update.conf', 'name': 'Coreos'},
|
{'path': '/etc/coreos/update.conf', 'name': 'Coreos'},
|
||||||
|
@ -82,7 +82,7 @@ class DistributionFiles:
|
||||||
SEARCH_STRING = {
|
SEARCH_STRING = {
|
||||||
'OracleLinux': 'Oracle Linux',
|
'OracleLinux': 'Oracle Linux',
|
||||||
'RedHat': 'Red Hat',
|
'RedHat': 'Red Hat',
|
||||||
'Altlinux': 'ALT Linux',
|
'Altlinux': 'ALT',
|
||||||
'ClearLinux': 'Clear Linux',
|
'ClearLinux': 'Clear Linux',
|
||||||
'SMGL': 'Source Mage GNU/Linux',
|
'SMGL': 'Source Mage GNU/Linux',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue