mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615 * Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
This commit is contained in:
parent
31c1bdd6a8
commit
774a667591
3 changed files with 23 additions and 1 deletions
2
changelogs/fragments/49615-ascii-devuan-support.yml
Normal file
2
changelogs/fragments/49615-ascii-devuan-support.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Extend support for Devuan ascii distribution
|
|
@ -329,7 +329,7 @@ class DistributionFiles:
|
|||
debian_facts['distribution_release'] = release.groups()[0]
|
||||
elif 'Devuan' in data:
|
||||
debian_facts['distribution'] = 'Devuan'
|
||||
release = re.search(r"PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
|
||||
release = re.search(r"PRETTY_NAME=\"?[^(\"]+ \(?([^) \"]+)\)?", data)
|
||||
if release:
|
||||
debian_facts['distribution_release'] = release.groups()[0]
|
||||
version = re.search(r"VERSION_ID=\"(.*)\"", data)
|
||||
|
|
|
@ -509,6 +509,26 @@ BUG_REPORT_URL="https://bugs.devuan.org/"
|
|||
'distribution_version': u'1'
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': "Devuan",
|
||||
'input': {
|
||||
'/etc/os-release': """PRETTY_NAME="Devuan GNU/Linux ascii"
|
||||
NAME="Devuan GNU/Linux"
|
||||
ID=devuan
|
||||
HOME_URL="https://www.devuan.org/"
|
||||
SUPPORT_URL="https://devuan.org/os/community"
|
||||
BUG_REPORT_URL="https://bugs.devuan.org/"
|
||||
"""
|
||||
},
|
||||
'platform.dist': ('', '', ''),
|
||||
'result': {
|
||||
'distribution': u'Devuan',
|
||||
'distribution_major_version': u'NA',
|
||||
'distribution_release': u'ascii',
|
||||
'os_family': 'Debian',
|
||||
'distribution_version': u'NA'
|
||||
}
|
||||
},
|
||||
{
|
||||
"platform.dist": [
|
||||
"Ubuntu",
|
||||
|
|
Loading…
Reference in a new issue