facts - Set correct OS family for EuroLinux (#76624)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/76654/head
Jaromaz 3 years ago committed by GitHub
parent a5f4a25d32
commit 16def8050a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- distribution - add EuroLinux to fact gathering (https://github.com/ansible/ansible/pull/76624).

@ -484,7 +484,8 @@ class Distribution(object):
OS_FAMILY_MAP = {'RedHat': ['RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', OS_FAMILY_MAP = {'RedHat': ['RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC',
'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS',
'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba', 'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba',
'EulerOS', 'openEuler', 'AlmaLinux', 'Rocky', 'TencentOS'], 'EulerOS', 'openEuler', 'AlmaLinux', 'Rocky', 'TencentOS',
'EuroLinux'],
'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon', 'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',
'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux', 'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux',
'Pop!_OS', 'Parrot', 'Pardus GNU/Linux'], 'Pop!_OS', 'Parrot', 'Pardus GNU/Linux'],

@ -946,6 +946,12 @@ class RedosHostname(Hostname):
strategy_class = SystemdStrategy strategy_class = SystemdStrategy
class EurolinuxHostname(Hostname):
platform = 'Linux'
distribution = 'Eurolinux'
strategy_class = RedHatStrategy
def main(): def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec=dict( argument_spec=dict(

@ -0,0 +1,46 @@
{
"name": "EuroLinux 8.5",
"distro": {
"codename": "Tirana",
"id": "eurolinux",
"name": "EuroLinux",
"version": "8.5",
"version_best": "8.5",
"lsb_release_info": {},
"os_release_info": {
"name": "EuroLinux",
"version": "8.5 (Tirana)",
"id": "eurolinux",
"id_like": "rhel fedora centos",
"version_id": "8.5",
"platform_id": "platform:el8",
"pretty_name": "EuroLinux 8.5 (Tirana)",
"ansi_color": "0;34",
"cpe_name": "cpe:/o:eurolinux:eurolinux:8",
"home_url": "https://www.euro-linux.com/",
"bug_report_url": "https://github.com/EuroLinux/eurolinux-distro-bugs-and-rfc/",
"redhat_support_product": "EuroLinux",
"redhat_support_product_version": "8",
"codename": "Tirana"
}
},
"input": {
"/etc/redhat-release": "EuroLinux release 8.5 (Tirana) \n",
"/etc/system-release": "EuroLinux release 8.5 (Tirana) \n",
"/etc/os-release": "NAME=\"EuroLinux\"\nVERSION=\"8.5 (Tirana)\"\nID=\"eurolinux\"\nID_LIKE=\"rhel fedora centos\"\nVERSION_ID=\"8.5\"\nPLATFORM_ID=\"platform:el8\"\nPRETTY_NAME=\"EuroLinux 8.5 (Tirana)\"\nANSI_COLOR=\"0;34\"\nCPE_NAME=\"cpe:/o:eurolinux:eurolinux:8\"\nHOME_URL=\"https://www.euro-linux.com/\"\nBUG_REPORT_URL=\"https://github.com/EuroLinux/eurolinux-distro-bugs-and-rfc/\"\nREDHAT_SUPPORT_PRODUCT=\"EuroLinux\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"8\"\n",
"/usr/lib/os-release": "NAME=\"EuroLinux\"\nVERSION=\"8.5 (Tirana)\"\nID=\"eurolinux\"\nID_LIKE=\"rhel fedora centos\"\nVERSION_ID=\"8.5\"\nPLATFORM_ID=\"platform:el8\"\nPRETTY_NAME=\"EuroLinux 8.5 (Tirana)\"\nANSI_COLOR=\"0;34\"\nCPE_NAME=\"cpe:/o:eurolinux:eurolinux:8\"\nHOME_URL=\"https://www.euro-linux.com/\"\nBUG_REPORT_URL=\"https://github.com/EuroLinux/eurolinux-distro-bugs-and-rfc/\"\nREDHAT_SUPPORT_PRODUCT=\"EuroLinux\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"8\"\n"
},
"platform.dist": [
"eurolinux",
"8.5",
"Tirana"
],
"result": {
"distribution": "EuroLinux",
"distribution_version": "8.5",
"distribution_release": "Tirana",
"distribution_major_version": "8",
"os_family": "RedHat"
},
"platform.release": "4.18.0-348.2.1.el8_5.x86_64"
}
Loading…
Cancel
Save