Skip to content

Commit

Permalink
Distribution: Add PopOS as Debian OS_FAMILY (ansible#69294)
Browse files Browse the repository at this point in the history
PopOS is a Debian based OS distribution, added support to detect
ansible_os_family as 'debian' instead of 'Pop!_OS'

Fixes: ansible#69286

Signed-off-by: Abhijeet Kasurde <[email protected]>
  • Loading branch information
Akasurde authored May 5, 2020
1 parent 947fa3b commit 794d269
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/69286_pop_os_distribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Added PopOS as a part of Debian OS distribution family (https://github.com/ansible/ansible/issues/69286).
3 changes: 2 additions & 1 deletion lib/ansible/module_utils/facts/system/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ class Distribution(object):
'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS',
'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba', 'EulerOS'],
'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',
'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux'],
'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux',
'Pop!_OS', ],
'Suse': ['SuSE', 'SLES', 'SLED', 'openSUSE', 'openSUSE Tumbleweed',
'SLES_SAP', 'SUSE_LINUX', 'openSUSE Leap'],
'Archlinux': ['Archlinux', 'Antergos', 'Manjaro'],
Expand Down
29 changes: 29 additions & 0 deletions test/units/module_utils/test_distribution_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,35 @@
"lsb_release_info": {},
},
},
{
"name": "Pop!_OS 20.04",
"distro": {
"codename": "focal",
"id": "pop",
"name": "Pop!_OS",
"version": "20.04",
"version_best": "20.04",
'os_release_info': {},
'lsb_release_info': {},
},
"input": {
"/etc/os-release": "NAME=\"Pop!_OS\"\nVERSION=\"20.04\"\nID=pop\nID_LIKE=\"ubuntu debian\"\nPRETTY_NAME=\"Pop!_OS 20.04\"\nVERSION_ID=\"20.04\"\nHOME_URL=\"https://system76.com/pop\"\nSUPPORT_URL=\"http://support.system76.com\"\nBUG_REPORT_URL=\"https://github.com/pop-os/pop/issues\"\nPRIVACY_POLICY_URL=\"https://system76.com/privacy\"\nVERSION_CODENAME=focal\nUBUNTU_CODENAME=focal\nLOGO=distributor-logo-pop-os\n", # noqa
"/etc/lsb-release": "DISTRIB_ID=Pop\nDISTRIB_RELEASE=20.04\nDISTRIB_CODENAME=focal\nDISTRIB_DESCRIPTION=\"Pop!_OS 20.04\"\n",
"/usr/lib/os-release": "NAME=\"Pop!_OS\"\nVERSION=\"20.04\"\nID=pop\nID_LIKE=\"ubuntu debian\"\nPRETTY_NAME=\"Pop!_OS 20.04\"\nVERSION_ID=\"20.04\"\nHOME_URL=\"https://system76.com/pop\"\nSUPPORT_URL=\"http://support.system76.com\"\nBUG_REPORT_URL=\"https://github.com/pop-os/pop/issues\"\nPRIVACY_POLICY_URL=\"https://system76.com/privacy\"\nVERSION_CODENAME=focal\nUBUNTU_CODENAME=focal\nLOGO=distributor-logo-pop-os\n", # noqa
},
"platform.dist": [
"pop",
"20.04",
"focal"
],
"result": {
"distribution": "Pop!_OS",
"distribution_version": "20.04",
"distribution_release": "focal",
"distribution_major_version": "20",
"os_family": "Debian"
}
},
]


Expand Down

0 comments on commit 794d269

Please sign in to comment.