@ -41,125 +41,134 @@ TESTSETS = [
" centos " ,
" centos " ,
" 7.2.1511 " ,
" 7.2.1511 " ,
" Core "
" Core "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " CentOS Linux release 7.2.1511 (Core) \n " ,
" /etc/redhat-release " : " CentOS Linux release 7.2.1511 (Core) \n " ,
" /etc/os-release " : ( " NAME= \" CentOS Linux \" \n VERSION= \" 7 (Core) \" \n ID= \" centos \" \n ID_LIKE= \" rhel fedora \" \n VERSION_ID= \" 7 \" \n "
" /etc/os-release " : (
" PRETTY_NAME= \" CentOS Linux 7 (Core) \" \n ANSI_COLOR= \" 0;31 \" \n CPE_NAME= \" cpe:/o:centos:centos:7 \" \n "
" NAME= \" CentOS Linux \" \n VERSION= \" 7 (Core) \" \n ID= \" centos \" \n ID_LIKE= \" rhel fedora \" \n VERSION_ID= \" 7 \" \n "
" HOME_URL= \" https://www.centos.org/ \" \n BUG_REPORT_URL= \" https://bugs.centos.org/ \" \n \n CENTOS_MANTISBT_PROJECT= \" CentOS-7 \" \n "
" PRETTY_NAME= \" CentOS Linux 7 (Core) \" \n ANSI_COLOR= \" 0;31 \" \n CPE_NAME= \" cpe:/o:centos:centos:7 \" \n "
" CENTOS_MANTISBT_PROJECT_VERSION= \" 7 \" \n REDHAT_SUPPORT_PRODUCT= \" centos \" \n REDHAT_SUPPORT_PRODUCT_VERSION= \" 7 \" \n \n " ) ,
" HOME_URL= \" https://www.centos.org/ \" \n BUG_REPORT_URL= \" https://bugs.centos.org/ \" \n \n CENTOS_MANTISBT_PROJECT= \" CentOS-7 \" \n "
" CENTOS_MANTISBT_PROJECT_VERSION= \" 7 \" \n REDHAT_SUPPORT_PRODUCT= \" centos \" \n REDHAT_SUPPORT_PRODUCT_VERSION= \" 7 \" \n \n "
) ,
" /etc/system-release " : " CentOS Linux release 7.2.1511 (Core) \n "
" /etc/system-release " : " CentOS Linux release 7.2.1511 (Core) \n "
} ,
} ,
" name " : " CentOS 7.2.1511 " ,
" name " : " CentOS 7.2.1511 " ,
" result " : {
" result " : {
" distribution_release " : " Core " ,
" distribution_release " : " Core " ,
" distribution " : " CentOS " ,
" distribution " : " CentOS " ,
" distribution_major_version " : " 7 " ,
" distribution_major_version " : " 7 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 7.2.1511 "
" distribution_version " : " 7.2.1511 " ,
}
}
} ,
} ,
{
{
" name " : " CentOS 6.7 " ,
" name " : " CentOS 6.7 " ,
" platform.dist " : [
" platform.dist " : [
" centos " ,
" centos " ,
" 6.7 " ,
" 6.7 " ,
" Final "
" Final "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " CentOS release 6.7 (Final) \n " ,
" /etc/redhat-release " : " CentOS release 6.7 (Final) \n " ,
" /etc/lsb-release " : ( " LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch: "
" /etc/lsb-release " : (
" printing-4.0-amd64:printing-4.0-noarch \n " ) ,
" LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch: "
" printing-4.0-amd64:printing-4.0-noarch \n "
) ,
" /etc/system-release " : " CentOS release 6.7 (Final) \n "
" /etc/system-release " : " CentOS release 6.7 (Final) \n "
} ,
} ,
" result " : {
" result " : {
" distribution_release " : " Final " ,
" distribution_release " : " Final " ,
" distribution " : " CentOS " ,
" distribution " : " CentOS " ,
" distribution_major_version " : " 6 " ,
" distribution_major_version " : " 6 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 6.7 "
" distribution_version " : " 6.7 "
}
}
} ,
} ,
{
{
" name " : " RedHat 7.2 " ,
" name " : " RedHat 7.2 " ,
" platform.dist " : [
" platform.dist " : [
" redhat " ,
" redhat " ,
" 7.2 " ,
" 7.2 " ,
" Maipo "
" Maipo "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " Red Hat Enterprise Linux Server release 7.2 (Maipo) \n " ,
" /etc/redhat-release " : " Red Hat Enterprise Linux Server release 7.2 (Maipo) \n " ,
" /etc/os-release " : ( " NAME= \" Red Hat Enterprise Linux Server \" \n VERSION= \" 7.2 (Maipo) \" \n ID= \" rhel \" \n ID_LIKE= \" fedora \" \n VERSION_ID= \" 7.2 \" \n "
" /etc/os-release " : (
" PRETTY_NAME= \" Red Hat Enterprise Linux Server 7.2 (Maipo) \" \n ANSI_COLOR= \" 0;31 \" \n "
" NAME= \" Red Hat Enterprise Linux Server \" \n VERSION= \" 7.2 (Maipo) \" \n ID= \" rhel \" \n ID_LIKE= \" fedora \" \n VERSION_ID= \" 7.2 \" \n "
" CPE_NAME= \" cpe:/o:redhat:enterprise_linux:7.2:GA:server \" \n HOME_URL= \" https://www.redhat.com/ \" \n "
" PRETTY_NAME= \" Red Hat Enterprise Linux Server 7.2 (Maipo) \" \n ANSI_COLOR= \" 0;31 \" \n "
" BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n \n REDHAT_BUGZILLA_PRODUCT= \" Red Hat Enterprise Linux 7 \" \n "
" CPE_NAME= \" cpe:/o:redhat:enterprise_linux:7.2:GA:server \" \n HOME_URL= \" https://www.redhat.com/ \" \n "
" REDHAT_BUGZILLA_PRODUCT_VERSION=7.2 \n REDHAT_SUPPORT_PRODUCT= \" Red Hat Enterprise Linux \" \n "
" BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n \n REDHAT_BUGZILLA_PRODUCT= \" Red Hat Enterprise Linux 7 \" \n "
" REDHAT_SUPPORT_PRODUCT_VERSION= \" 7.2 \" \n " ) ,
" REDHAT_BUGZILLA_PRODUCT_VERSION=7.2 \n REDHAT_SUPPORT_PRODUCT= \" Red Hat Enterprise Linux \" \n "
" REDHAT_SUPPORT_PRODUCT_VERSION= \" 7.2 \" \n "
) ,
" /etc/system-release " : " Red Hat Enterprise Linux Server release 7.2 (Maipo) \n "
" /etc/system-release " : " Red Hat Enterprise Linux Server release 7.2 (Maipo) \n "
} ,
} ,
" result " : {
" result " : {
" distribution_release " : " Maipo " ,
" distribution_release " : " Maipo " ,
" distribution " : " RedHat " ,
" distribution " : " RedHat " ,
" distribution_major_version " : " 7 " ,
" distribution_major_version " : " 7 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 7.2 "
" distribution_version " : " 7.2 "
}
}
} ,
} ,
{
{
" name " : " RedHat 6.7 " ,
" name " : " RedHat 6.7 " ,
" platform.dist " : [
" platform.dist " : [
" redhat " ,
" redhat " ,
" 6.7 " ,
" 6.7 " ,
" Santiago "
" Santiago "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " Red Hat Enterprise Linux Server release 6.7 (Santiago) \n " ,
" /etc/redhat-release " : " Red Hat Enterprise Linux Server release 6.7 (Santiago) \n " ,
" /etc/lsb-release " : ( " LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch: "
" /etc/lsb-release " : (
" printing-4.0-amd64:printing-4.0-noarch \n " ) ,
" LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch: "
" printing-4.0-amd64:printing-4.0-noarch \n "
) ,
" /etc/system-release " : " Red Hat Enterprise Linux Server release 6.7 (Santiago) \n "
" /etc/system-release " : " Red Hat Enterprise Linux Server release 6.7 (Santiago) \n "
} ,
} ,
" result " : {
" result " : {
" distribution_release " : " Santiago " ,
" distribution_release " : " Santiago " ,
" distribution " : " RedHat " ,
" distribution " : " RedHat " ,
" distribution_major_version " : " 6 " ,
" distribution_major_version " : " 6 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 6.7 "
" distribution_version " : " 6.7 "
}
}
} ,
} ,
{
{
" name " : " Virtuozzo 7.3 " ,
" name " : " Virtuozzo 7.3 " ,
" platform.dist " : [
" platform.dist " : [
" redhat " ,
" redhat " ,
" 7.3 " ,
" 7.3 " ,
" "
" "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " Virtuozzo Linux release 7.3 \n " ,
" /etc/redhat-release " : " Virtuozzo Linux release 7.3 \n " ,
" /etc/os-release " : ( " NAME= \" Virtuozzo \" \n "
" /etc/os-release " : (
" VERSION= \" 7.0.3 \" \n "
" NAME= \" Virtuozzo \" \n "
" ID= \" virtuozzo \" \n "
" VERSION= \" 7.0.3 \" \n "
" ID_LIKE= \" rhel fedora \" \n "
" ID= \" virtuozzo \" \n "
" VERSION_ID= \" 7 \" \n "
" ID_LIKE= \" rhel fedora \" \n "
" PRETTY_NAME= \" Virtuozzo release 7.0.3 \" \n "
" VERSION_ID= \" 7 \" \n "
" ANSI_COLOR= \" 0;31 \" \n "
" PRETTY_NAME= \" Virtuozzo release 7.0.3 \" \n "
" CPE_NAME= \" cpe:/o:virtuozzoproject:vz:7 \" \n "
" ANSI_COLOR= \" 0;31 \" \n "
" HOME_URL= \" http://www.virtuozzo.com \" \n "
" CPE_NAME= \" cpe:/o:virtuozzoproject:vz:7 \" \n "
" BUG_REPORT_URL= \" https://bugs.openvz.org/ \" \n " ) ,
" HOME_URL= \" http://www.virtuozzo.com \" \n "
" BUG_REPORT_URL= \" https://bugs.openvz.org/ \" \n "
) ,
" /etc/system-release " : " Virtuozzo release 7.0.3 (640) \n "
" /etc/system-release " : " Virtuozzo release 7.0.3 (640) \n "
} ,
} ,
" result " : {
" result " : {
" distribution_release " : " NA " ,
" distribution_release " : " NA " ,
" distribution " : " Virtuozzo " ,
" distribution " : " Virtuozzo " ,
" distribution_major_version " : " 7 " ,
" distribution_major_version " : " 7 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 7.3 "
" distribution_version " : " 7.3 "
}
}
} ,
} ,
{
{
" name " : " openSUSE Leap 42.1 " ,
" name " : " openSUSE Leap 42.1 " ,
" input " : {
" input " : {
" /etc/os-release " :
" /etc/os-release " : """
"""
NAME = " openSUSE Leap "
NAME = " openSUSE Leap "
VERSION = " 42.1 "
VERSION = " 42.1 "
VERSION_ID = " 42.1 "
VERSION_ID = " 42.1 "
@ -170,16 +179,16 @@ CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
BUG_REPORT_URL = " https://bugs.opensuse.org "
BUG_REPORT_URL = " https://bugs.opensuse.org "
HOME_URL = " https://opensuse.org/ "
HOME_URL = " https://opensuse.org/ "
ID_LIKE = " suse "
ID_LIKE = " suse "
""" ,
""" ,
" /etc/SuSE-release " : """
" /etc/SuSE-release " : """
openSUSE 42.1 ( x86_64 )
openSUSE 42.1 ( x86_64 )
VERSION = 42.1
VERSION = 42.1
CODENAME = Malachite
CODENAME = Malachite
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
"""
"""
} ,
} ,
" platform.dist " : [ ' SuSE ' , ' 42.1 ' , ' x86_64 ' ] ,
" platform.dist " : [ ' SuSE ' , ' 42.1 ' , ' x86_64 ' ] ,
" result " : {
" result " : {
" distribution " : " openSUSE Leap " ,
" distribution " : " openSUSE Leap " ,
" distribution_major_version " : " 42 " ,
" distribution_major_version " : " 42 " ,
" distribution_release " : " 1 " ,
" distribution_release " : " 1 " ,
@ -189,12 +198,13 @@ CODENAME = Malachite
} ,
} ,
{
{
' name ' : ' openSUSE 13.2 ' ,
' name ' : ' openSUSE 13.2 ' ,
' input ' : { ' /etc/SuSE-release ' : """ openSUSE 13.2 (x86_64)
' input ' : {
' /etc/SuSE-release ' : """ openSUSE 13.2 (x86_64)
VERSION = 13.2
VERSION = 13.2
CODENAME = Harlequin
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
""" ,
""" ,
' /etc/os-release ' : """ NAME=openSUSE
' /etc/os-release ' : """ NAME=openSUSE
VERSION = " 13.2 (Harlequin) "
VERSION = " 13.2 (Harlequin) "
VERSION_ID = " 13.2 "
VERSION_ID = " 13.2 "
PRETTY_NAME = " openSUSE 13.2 (Harlequin) (x86_64) "
PRETTY_NAME = " openSUSE 13.2 (Harlequin) (x86_64) "
@ -204,13 +214,16 @@ CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL = " https://bugs.opensuse.org "
BUG_REPORT_URL = " https://bugs.opensuse.org "
HOME_URL = " https://opensuse.org/ "
HOME_URL = " https://opensuse.org/ "
ID_LIKE = " suse "
ID_LIKE = " suse "
""" },
"""
} ,
' platform.dist ' : ( ' SuSE ' , ' 13.2 ' , ' x86_64 ' ) ,
' platform.dist ' : ( ' SuSE ' , ' 13.2 ' , ' x86_64 ' ) ,
' result ' : { ' distribution ' : u ' openSUSE ' ,
' result ' : {
' distribution_major_version ' : u ' 13 ' ,
' distribution ' : u ' openSUSE ' ,
' distribution_release ' : u ' 2 ' ,
' distribution_major_version ' : u ' 13 ' ,
' os_family ' : u ' Suse ' ,
' distribution_release ' : u ' 2 ' ,
' distribution_version ' : u ' 13.2 ' }
' os_family ' : u ' Suse ' ,
' distribution_version ' : u ' 13.2 '
}
} ,
} ,
{
{
" platform.dist " : [
" platform.dist " : [
@ -219,9 +232,11 @@ ID_LIKE="suse"
" "
" "
] ,
] ,
" input " : {
" input " : {
" /etc/os-release " : ( " NAME= \" openSUSE Tumbleweed \" \n # VERSION= \" 20160917 \" \n ID=opensuse \n ID_LIKE= \" suse \" \n VERSION_ID= \" 20160917 \" \n "
" /etc/os-release " : (
" PRETTY_NAME= \" openSUSE Tumbleweed \" \n ANSI_COLOR= \" 0;32 \" \n CPE_NAME= \" cpe:/o:opensuse:tumbleweed:20160917 \" \n "
" NAME= \" openSUSE Tumbleweed \" \n # VERSION= \" 20160917 \" \n ID=opensuse \n ID_LIKE= \" suse \" \n VERSION_ID= \" 20160917 \" \n "
" BUG_REPORT_URL= \" https://bugs.opensuse.org \" \n HOME_URL= \" https://www.opensuse.org/ \" \n " )
" PRETTY_NAME= \" openSUSE Tumbleweed \" \n ANSI_COLOR= \" 0;32 \" \n CPE_NAME= \" cpe:/o:opensuse:tumbleweed:20160917 \" \n "
" BUG_REPORT_URL= \" https://bugs.opensuse.org \" \n HOME_URL= \" https://www.opensuse.org/ \" \n "
)
} ,
} ,
" name " : " openSUSE Tumbleweed 20160917 " ,
" name " : " openSUSE Tumbleweed 20160917 " ,
" result " : {
" result " : {
@ -235,14 +250,14 @@ ID_LIKE="suse"
{ # see https://github.com/ansible/ansible/issues/14837
{ # see https://github.com/ansible/ansible/issues/14837
" name " : " SLES 11.3 " ,
" name " : " SLES 11.3 " ,
" input " : {
" input " : {
" /etc/SuSE-release " : """
" /etc/SuSE-release " : """
SUSE Linux Enterprise Server 11 ( x86_64 )
SUSE Linux Enterprise Server 11 ( x86_64 )
VERSION = 11
VERSION = 11
PATCHLEVEL = 3
PATCHLEVEL = 3
"""
"""
} ,
} ,
" platform.dist " : [ ' SuSE ' , ' 11 ' , ' x86_64 ' ] ,
" platform.dist " : [ ' SuSE ' , ' 11 ' , ' x86_64 ' ] ,
" result " : {
" result " : {
" distribution " : " SLES " ,
" distribution " : " SLES " ,
" distribution_major_version " : " 11 " ,
" distribution_major_version " : " 11 " ,
" distribution_release " : " 3 " ,
" distribution_release " : " 3 " ,
@ -253,12 +268,12 @@ PATCHLEVEL = 3
{ # see https://github.com/ansible/ansible/issues/14837
{ # see https://github.com/ansible/ansible/issues/14837
" name " : " SLES 11.4 " ,
" name " : " SLES 11.4 " ,
" input " : {
" input " : {
" /etc/SuSE-release " : """
" /etc/SuSE-release " : """
SUSE Linux Enterprise Server 11 ( x86_64 )
SUSE Linux Enterprise Server 11 ( x86_64 )
VERSION = 11
VERSION = 11
PATCHLEVEL = 4
PATCHLEVEL = 4
""" ,
""" ,
" /etc/os-release " : """
" /etc/os-release " : """
NAME = " SLES "
NAME = " SLES "
VERSION = " 11.4 "
VERSION = " 11.4 "
VERSION_ID = " 11.4 "
VERSION_ID = " 11.4 "
@ -266,7 +281,7 @@ PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
ID = " sles "
ID = " sles "
ANSI_COLOR = " 0;32 "
ANSI_COLOR = " 0;32 "
CPE_NAME = " cpe:/o:suse:sles:11:4 "
CPE_NAME = " cpe:/o:suse:sles:11:4 "
""" ,
""" ,
} ,
} ,
" platform.dist " : [ ' SuSE ' , ' 11 ' , ' x86_64 ' ] ,
" platform.dist " : [ ' SuSE ' , ' 11 ' , ' x86_64 ' ] ,
" result " : {
" result " : {
@ -280,14 +295,14 @@ CPE_NAME="cpe:/o:suse:sles:11:4"
{ # see https://github.com/ansible/ansible/issues/14837
{ # see https://github.com/ansible/ansible/issues/14837
" name " : " SLES 12 SP0 " ,
" name " : " SLES 12 SP0 " ,
" input " : {
" input " : {
" /etc/SuSE-release " : """
" /etc/SuSE-release " : """
SUSE Linux Enterprise Server 12 ( x86_64 )
SUSE Linux Enterprise Server 12 ( x86_64 )
VERSION = 12
VERSION = 12
PATCHLEVEL = 0
PATCHLEVEL = 0
# This file is deprecated and will be removed in a future service pack or release.
# This file is deprecated and will be removed in a future service pack or release.
# Please check /etc/os-release for details about this release.
# Please check /etc/os-release for details about this release.
""" ,
""" ,
" /etc/os-release " : """
" /etc/os-release " : """
NAME = " SLES "
NAME = " SLES "
VERSION = " 12 "
VERSION = " 12 "
VERSION_ID = " 12 "
VERSION_ID = " 12 "
@ -295,10 +310,10 @@ PRETTY_NAME="SUSE Linux Enterprise Server 12"
ID = " sles "
ID = " sles "
ANSI_COLOR = " 0;32 "
ANSI_COLOR = " 0;32 "
CPE_NAME = " cpe:/o:suse:sles:12 "
CPE_NAME = " cpe:/o:suse:sles:12 "
""" ,
""" ,
} ,
} ,
" platform.dist " : [ ' SuSE ' , ' 12 ' , ' x86_64 ' ] ,
" platform.dist " : [ ' SuSE ' , ' 12 ' , ' x86_64 ' ] ,
" result " : {
" result " : {
" distribution " : " SLES " ,
" distribution " : " SLES " ,
" distribution_major_version " : " 12 " ,
" distribution_major_version " : " 12 " ,
" distribution_release " : " 0 " ,
" distribution_release " : " 0 " ,
@ -306,18 +321,17 @@ CPE_NAME="cpe:/o:suse:sles:12"
" distribution_version " : " 12 " ,
" distribution_version " : " 12 " ,
}
}
} ,
} ,
{ # see https://github.com/ansible/ansible/issues/14837
{ # see https://github.com/ansible/ansible/issues/14837
" name " : " SLES 12 SP1 " ,
" name " : " SLES 12 SP1 " ,
" input " : {
" input " : {
" /etc/SuSE-release " : """
" /etc/SuSE-release " : """
SUSE Linux Enterprise Server 12 ( x86_64 )
SUSE Linux Enterprise Server 12 ( x86_64 )
VERSION = 12
VERSION = 12
PATCHLEVEL = 0
PATCHLEVEL = 0
# This file is deprecated and will be removed in a future service pack or release.
# This file is deprecated and will be removed in a future service pack or release.
# Please check /etc/os-release for details about this release.
# Please check /etc/os-release for details about this release.
""" ,
""" ,
" /etc/os-release " : """
" /etc/os-release " : """
NAME = " SLES "
NAME = " SLES "
VERSION = " 12-SP1 "
VERSION = " 12-SP1 "
VERSION_ID = " 12.1 "
VERSION_ID = " 12.1 "
@ -340,20 +354,20 @@ CPE_NAME="cpe:/o:suse:sles:12:sp1"
{
{
" name " : " Debian stretch/sid " ,
" name " : " Debian stretch/sid " ,
" input " : {
" input " : {
" /etc/os-release " : """
" /etc/os-release " : """
PRETTY_NAME = " Debian GNU/Linux stretch/sid "
PRETTY_NAME = " Debian GNU/Linux stretch/sid "
NAME = " Debian GNU/Linux "
NAME = " Debian GNU/Linux "
ID = debian
ID = debian
HOME_URL = " https://www.debian.org/ "
HOME_URL = " https://www.debian.org/ "
SUPPORT_URL = " https://www.debian.org/support "
SUPPORT_URL = " https://www.debian.org/support "
BUG_REPORT_URL = " https://bugs.debian.org/ "
BUG_REPORT_URL = " https://bugs.debian.org/ "
""" ,
""" ,
" /etc/debian_version " : """
" /etc/debian_version " : """
stretch / sid
stretch / sid
""" ,
""" ,
} ,
} ,
" platform.dist " : ( ' debian ' , ' stretch/sid ' , ' ' ) ,
" platform.dist " : ( ' debian ' , ' stretch/sid ' , ' ' ) ,
" result " : {
" result " : {
" distribution " : " Debian " ,
" distribution " : " Debian " ,
" distribution_major_version " : " stretch/sid " ,
" distribution_major_version " : " stretch/sid " ,
" distribution_release " : " NA " ,
" distribution_release " : " NA " ,
@ -363,7 +377,8 @@ BUG_REPORT_URL="https://bugs.debian.org/"
} ,
} ,
{
{
' name ' : " Debian 7.9 " ,
' name ' : " Debian 7.9 " ,
' input ' : { ' /etc/os-release ' : """ PRETTY_NAME= " Debian GNU/Linux 7 (wheezy) "
' input ' : {
' /etc/os-release ' : """ PRETTY_NAME= " Debian GNU/Linux 7 (wheezy) "
NAME = " Debian GNU/Linux "
NAME = " Debian GNU/Linux "
VERSION_ID = " 7 "
VERSION_ID = " 7 "
VERSION = " 7 (wheezy) "
VERSION = " 7 (wheezy) "
@ -372,13 +387,16 @@ ANSI_COLOR="1;31"
HOME_URL = " http://www.debian.org/ "
HOME_URL = " http://www.debian.org/ "
SUPPORT_URL = " http://www.debian.org/support/ "
SUPPORT_URL = " http://www.debian.org/support/ "
BUG_REPORT_URL = " http://bugs.debian.org/ "
BUG_REPORT_URL = " http://bugs.debian.org/ "
""" },
"""
} ,
' platform.dist ' : ( ' debian ' , ' 7.9 ' , ' ' ) ,
' platform.dist ' : ( ' debian ' , ' 7.9 ' , ' ' ) ,
' result ' : { ' distribution ' : u ' Debian ' ,
' result ' : {
' distribution_major_version ' : u ' 7 ' ,
' distribution ' : u ' Debian ' ,
' distribution_release ' : u ' wheezy ' ,
' distribution_major_version ' : u ' 7 ' ,
" os_family " : " Debian " ,
' distribution_release ' : u ' wheezy ' ,
' distribution_version ' : u ' 7.9 ' }
" os_family " : " Debian " ,
' distribution_version ' : u ' 7.9 '
}
} ,
} ,
{
{
" platform.dist " : [
" platform.dist " : [
@ -387,9 +405,11 @@ BUG_REPORT_URL="http://bugs.debian.org/"
" xenial "
" xenial "
] ,
] ,
" input " : {
" input " : {
" /etc/os-release " : ( " NAME= \" Ubuntu \" \n VERSION= \" 16.04 LTS (Xenial Xerus) \" \n ID=ubuntu \n ID_LIKE=debian \n PRETTY_NAME= \" Ubuntu 16.04 LTS \" \n "
" /etc/os-release " : (
" VERSION_ID= \" 16.04 \" \n HOME_URL= \" http://www.ubuntu.com/ \" \n SUPPORT_URL= \" http://help.ubuntu.com/ \" \n "
" NAME= \" Ubuntu \" \n VERSION= \" 16.04 LTS (Xenial Xerus) \" \n ID=ubuntu \n ID_LIKE=debian \n PRETTY_NAME= \" Ubuntu 16.04 LTS \" \n "
" BUG_REPORT_URL= \" http://bugs.launchpad.net/ubuntu/ \" \n UBUNTU_CODENAME=xenial \n " ) ,
" VERSION_ID= \" 16.04 \" \n HOME_URL= \" http://www.ubuntu.com/ \" \n SUPPORT_URL= \" http://help.ubuntu.com/ \" \n "
" BUG_REPORT_URL= \" http://bugs.launchpad.net/ubuntu/ \" \n UBUNTU_CODENAME=xenial \n "
) ,
" /etc/lsb-release " : " DISTRIB_ID=Ubuntu \n DISTRIB_RELEASE=16.04 \n DISTRIB_CODENAME=xenial \n DISTRIB_DESCRIPTION= \" Ubuntu 16.04 LTS \" \n "
" /etc/lsb-release " : " DISTRIB_ID=Ubuntu \n DISTRIB_RELEASE=16.04 \n DISTRIB_CODENAME=xenial \n DISTRIB_DESCRIPTION= \" Ubuntu 16.04 LTS \" \n "
} ,
} ,
" name " : " Ubuntu 16.04 " ,
" name " : " Ubuntu 16.04 " ,
@ -403,12 +423,13 @@ BUG_REPORT_URL="http://bugs.debian.org/"
} ,
} ,
{
{
' name ' : " Ubuntu 14.04 " ,
' name ' : " Ubuntu 14.04 " ,
' input ' : { ' /etc/lsb-release ' : """ DISTRIB_ID=Ubuntu
' input ' : {
' /etc/lsb-release ' : """ DISTRIB_ID=Ubuntu
DISTRIB_RELEASE = 14.04
DISTRIB_RELEASE = 14.04
DISTRIB_CODENAME = trusty
DISTRIB_CODENAME = trusty
DISTRIB_DESCRIPTION = " Ubuntu 14.04.4 LTS "
DISTRIB_DESCRIPTION = " Ubuntu 14.04.4 LTS "
""" ,
""" ,
' /etc/os-release ' : """ NAME= " Ubuntu "
' /etc/os-release ' : """ NAME= " Ubuntu "
VERSION = " 14.04.4 LTS, Trusty Tahr "
VERSION = " 14.04.4 LTS, Trusty Tahr "
ID = ubuntu
ID = ubuntu
ID_LIKE = debian
ID_LIKE = debian
@ -417,13 +438,16 @@ VERSION_ID="14.04"
HOME_URL = " http://www.ubuntu.com/ "
HOME_URL = " http://www.ubuntu.com/ "
SUPPORT_URL = " http://help.ubuntu.com/ "
SUPPORT_URL = " http://help.ubuntu.com/ "
BUG_REPORT_URL = " http://bugs.launchpad.net/ubuntu/ "
BUG_REPORT_URL = " http://bugs.launchpad.net/ubuntu/ "
""" },
"""
} ,
' platform.dist ' : ( ' Ubuntu ' , ' 14.04 ' , ' trusty ' ) ,
' platform.dist ' : ( ' Ubuntu ' , ' 14.04 ' , ' trusty ' ) ,
' result ' : { ' distribution ' : u ' Ubuntu ' ,
' result ' : {
' distribution_major_version ' : u ' 14 ' ,
' distribution ' : u ' Ubuntu ' ,
' distribution_release ' : u ' trusty ' ,
' distribution_major_version ' : u ' 14 ' ,
" os_family " : " Debian " ,
' distribution_release ' : u ' trusty ' ,
' distribution_version ' : u ' 14.04 ' }
" os_family " : " Debian " ,
' distribution_version ' : u ' 14.04 '
}
} ,
} ,
{
{
' name ' : " Ubuntu 12.04 " ,
' name ' : " Ubuntu 12.04 " ,
@ -470,7 +494,7 @@ VERSION_ID="12.04"
{
{
' name ' : ' Core OS ' ,
' name ' : ' Core OS ' ,
' input ' : {
' input ' : {
' /etc/os-release ' : """
' /etc/os-release ' : """
NAME = CoreOS
NAME = CoreOS
ID = coreos
ID = coreos
VERSION = 976.0 .0
VERSION = 976.0 .0
@ -480,15 +504,15 @@ PRETTY_NAME="CoreOS 976.0.0 (Coeur Rouge)"
ANSI_COLOR = " 1;32 "
ANSI_COLOR = " 1;32 "
HOME_URL = " https://coreos.com/ "
HOME_URL = " https://coreos.com/ "
BUG_REPORT_URL = " https://github.com/coreos/bugs/issues "
BUG_REPORT_URL = " https://github.com/coreos/bugs/issues "
""" ,
""" ,
' /etc/lsb-release ' : """ DISTRIB_ID=CoreOS
' /etc/lsb-release ' : """ DISTRIB_ID=CoreOS
DISTRIB_RELEASE = 976.0 .0
DISTRIB_RELEASE = 976.0 .0
DISTRIB_CODENAME = " Coeur Rouge "
DISTRIB_CODENAME = " Coeur Rouge "
DISTRIB_DESCRIPTION = " CoreOS 976.0.0 (Coeur Rouge) "
DISTRIB_DESCRIPTION = " CoreOS 976.0.0 (Coeur Rouge) "
""" ,
""" ,
} ,
} ,
' platform.dist ' : ( ' ' , ' ' , ' ' ) ,
' platform.dist ' : ( ' ' , ' ' , ' ' ) ,
' result ' : {
' result ' : {
" distribution " : " CoreOS " ,
" distribution " : " CoreOS " ,
" distribution_major_version " : " NA " ,
" distribution_major_version " : " NA " ,
" distribution_release " : " NA " ,
" distribution_release " : " NA " ,
@ -679,87 +703,90 @@ DISTRIB_DESCRIPTION="CoreOS 976.0.0 (Coeur Rouge)"
} ,
} ,
" platform.system " : " SunOS "
" platform.system " : " SunOS "
} ,
} ,
{
{
" name " : " Solaris 11.3 " ,
" name " : " Solaris 11.3 " ,
" platform.dist " : [
" platform.dist " : [
" " ,
" " ,
" " ,
" " ,
" "
" "
] ,
] ,
" input " : {
" input " : {
" /etc/release " : ( " Oracle Solaris 11.3 X86 \n Copyright (c) 1983, 2015, Oracle and/or its affiliates. "
" /etc/release " : (
" All rights reserved. \n Assembled 06 October 2015 \n " )
" Oracle Solaris 11.3 X86 \n Copyright (c) 1983, 2015, Oracle and/or its affiliates. "
} ,
" All rights reserved. \n Assembled 06 October 2015 \n "
)
} ,
" platform.system " : " SunOS " ,
" platform.system " : " SunOS " ,
" result " : {
" result " : {
" distribution_release " : " Oracle Solaris 11.3 X86 " ,
" distribution_release " : " Oracle Solaris 11.3 X86 " ,
" distribution " : " Solaris " ,
" distribution " : " Solaris " ,
" os_family " : " Solaris " ,
" os_family " : " Solaris " ,
" distribution_version " : " 11.3 "
" distribution_version " : " 11.3 "
}
}
} ,
} ,
{
{
" name " : " Solaris 10 " ,
" name " : " Solaris 10 " ,
" platform.dist " : [
" platform.dist " : [
" " ,
" " ,
" " ,
" " ,
" "
" "
] ,
] ,
" input " : {
" input " : {
" /etc/release " : ( " Oracle Solaris 10 1/13 s10x_u11wos_24a X86 \n Copyright (c) 1983, 2013, Oracle and/or its affiliates. "
" /etc/release " : ( " Oracle Solaris 10 1/13 s10x_u11wos_24a X86 \n Copyright (c) 1983, 2013, Oracle and/or its affiliates. "
" All rights reserved. \n Assembled 17 January 2013 \n " )
" All rights reserved. \n Assembled 17 January 2013 \n " )
} ,
} ,
" platform.system " : " SunOS " ,
" platform.system " : " SunOS " ,
" result " : {
" result " : {
" distribution_release " : " Oracle Solaris 10 1/13 s10x_u11wos_24a X86 " ,
" distribution_release " : " Oracle Solaris 10 1/13 s10x_u11wos_24a X86 " ,
" distribution " : " Solaris " ,
" distribution " : " Solaris " ,
" os_family " : " Solaris " ,
" os_family " : " Solaris " ,
" distribution_version " : " 10 "
" distribution_version " : " 10 "
}
}
} ,
} ,
{
{
" name " : " Fedora 22 " ,
" name " : " Fedora 22 " ,
" platform.dist " : [
" platform.dist " : [
" fedora " ,
" fedora " ,
" 22 " ,
" 22 " ,
" Twenty Two "
" Twenty Two "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " Fedora release 22 (Twenty Two) \n " ,
" /etc/redhat-release " : " Fedora release 22 (Twenty Two) \n " ,
" /etc/os-release " : ( " NAME=Fedora \n VERSION= \" 22 (Twenty Two) \" \n ID=fedora \n VERSION_ID=22 \n PRETTY_NAME= \" Fedora 22 (Twenty Two) \" \n "
" /etc/os-release " : (
" ANSI_COLOR= \" 0;34 \" \n CPE_NAME= \" cpe:/o:fedoraproject:fedora:22 \" \n HOME_URL= \" https://fedoraproject.org/ \" \n "
" NAME=Fedora \n VERSION= \" 22 (Twenty Two) \" \n ID=fedora \n VERSION_ID=22 \n PRETTY_NAME= \" Fedora 22 (Twenty Two) \" \n "
" BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n REDHAT_BUGZILLA_PRODUCT= \" Fedora \" \n REDHAT_BUGZILLA_PRODUCT_VERSION=22 \n "
" ANSI_COLOR= \" 0;34 \" \n CPE_NAME= \" cpe:/o:fedoraproject:fedora:22 \" \n HOME_URL= \" https://fedoraproject.org/ \" \n "
" REDHAT_SUPPORT_PRODUCT= \" Fedora \" \n REDHAT_SUPPORT_PRODUCT_VERSION=22 \n "
" BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n REDHAT_BUGZILLA_PRODUCT= \" Fedora \" \n REDHAT_BUGZILLA_PRODUCT_VERSION=22 \n "
" PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy \n " ) ,
" REDHAT_SUPPORT_PRODUCT= \" Fedora \" \n REDHAT_SUPPORT_PRODUCT_VERSION=22 \n "
" PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy \n "
) ,
" /etc/system-release " : " Fedora release 22 (Twenty Two) \n "
" /etc/system-release " : " Fedora release 22 (Twenty Two) \n "
} ,
} ,
" result " : {
" result " : {
" distribution_release " : " Twenty Two " ,
" distribution_release " : " Twenty Two " ,
" distribution " : " Fedora " ,
" distribution " : " Fedora " ,
" distribution_major_version " : " 22 " ,
" distribution_major_version " : " 22 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 22 "
" distribution_version " : " 22 "
}
}
} ,
} ,
{
{
" platform.dist " : [
" platform.dist " : [
" fedora " ,
" fedora " ,
" 25 " ,
" 25 " ,
" Rawhide "
" Rawhide "
] ,
] ,
" input " : {
" input " : {
" /etc/redhat-release " : " Fedora release 25 (Rawhide) \n " ,
" /etc/redhat-release " : " Fedora release 25 (Rawhide) \n " ,
" /etc/os-release " : ( " NAME=Fedora \n VERSION= \" 25 (Workstation Edition) \" \n ID=fedora \n VERSION_ID=25 \n "
" /etc/os-release " : (
" PRETTY_NAME= \" Fedora 25 (Workstation Edition) \" \n ANSI_COLOR= \" 0;34 \" \n CPE_NAME= \" cpe:/o:fedoraproject:fedora:25 \" \n "
" NAME=Fedora \n VERSION= \" 25 (Workstation Edition) \" \n ID=fedora \n VERSION_ID=25 \n "
" HOME_URL= \" https://fedoraproject.org/ \" \n BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n "
" PRETTY_NAME= \" Fedora 25 (Workstation Edition) \" \n ANSI_COLOR= \" 0;34 \" \n CPE_NAME= \" cpe:/o:fedoraproject:fedora:25 \" \n "
" REDHAT_BUGZILLA_PRODUCT= \" Fedora \" \n REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide \n REDHAT_SUPPORT_PRODUCT= \" Fedora \" \n "
" HOME_URL= \" https://fedoraproject.org/ \" \n BUG_REPORT_URL= \" https://bugzilla.redhat.com/ \" \n "
" REDHAT_SUPPORT_PRODUCT_VERSION=rawhide \n PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy \n "
" REDHAT_BUGZILLA_PRODUCT= \" Fedora \" \n REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide \n REDHAT_SUPPORT_PRODUCT= \" Fedora \" \n "
" VARIANT= \" Workstation Edition \" \n VARIANT_ID=workstation \n " ) ,
" REDHAT_SUPPORT_PRODUCT_VERSION=rawhide \n PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy \n "
" VARIANT= \" Workstation Edition \" \n VARIANT_ID=workstation \n "
) ,
" /etc/system-release " : " Fedora release 25 (Rawhide) \n "
" /etc/system-release " : " Fedora release 25 (Rawhide) \n "
} ,
} ,
" name " : " Fedora 25 " ,
" name " : " Fedora 25 " ,
" result " : {
" result " : {
" distribution_release " : " Rawhide " ,
" distribution_release " : " Rawhide " ,
@ -767,9 +794,8 @@ DISTRIB_DESCRIPTION="CoreOS 976.0.0 (Coeur Rouge)"
" distribution_major_version " : " 25 " ,
" distribution_major_version " : " 25 " ,
" os_family " : " RedHat " ,
" os_family " : " RedHat " ,
" distribution_version " : " 25 "
" distribution_version " : " 25 "
}
}
} ,
} ,
{
{
" platform.dist " : [
" platform.dist " : [
" " ,
" " ,
@ -787,9 +813,8 @@ DISTRIB_DESCRIPTION="CoreOS 976.0.0 (Coeur Rouge)"
" distribution_major_version " : " NA " ,
" distribution_major_version " : " NA " ,
" os_family " : " SMGL " ,
" os_family " : " SMGL " ,
" distribution_version " : " NA "
" distribution_version " : " NA "
}
}
} ,
} ,
]
]
@ -815,6 +840,7 @@ def test_distribution_version(testcase):
_test_one_distribution ( facts , module , testcase )
_test_one_distribution ( facts , module , testcase )
def _test_one_distribution ( facts , module , testcase ) :
def _test_one_distribution ( facts , module , testcase ) :
""" run the test on one distribution testcase
""" run the test on one distribution testcase
@ -828,7 +854,7 @@ def _test_one_distribution(facts, module, testcase):
data = default
data = default
if fname in testcase [ ' input ' ] :
if fname in testcase [ ' input ' ] :
# for debugging
# for debugging
print ( ' faked ' + fname + ' for ' + testcase [ ' name ' ] )
print ( ' faked %s for %s ' % ( fname , testcase [ ' name ' ] ) )
data = testcase [ ' input ' ] [ fname ] . strip ( )
data = testcase [ ' input ' ] [ fname ] . strip ( )
if strip and data is not None :
if strip and data is not None :
data = data . strip ( )
data = data . strip ( )