!50 Hostname module support openEuler and remove python-nose
From: @wk333 Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
aa4fb809e5
@ -2,7 +2,7 @@
|
|||||||
Name: ansible
|
Name: ansible
|
||||||
Summary: SSH-based configuration management, deployment, and task execution system
|
Summary: SSH-based configuration management, deployment, and task execution system
|
||||||
Version: 2.9.27
|
Version: 2.9.27
|
||||||
Release: 1
|
Release: 2
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
|
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
|
||||||
@ -16,6 +16,7 @@ Patch1: ansible-2.9.22-rocky.patch
|
|||||||
Patch2: ansible-2.9.6-disable-test_build_requirement_from_path_no_version.patch
|
Patch2: ansible-2.9.6-disable-test_build_requirement_from_path_no_version.patch
|
||||||
Patch3: fix-python-3.9-compatibility.patch
|
Patch3: fix-python-3.9-compatibility.patch
|
||||||
Patch4: ansible-2.9.23-sphinx4.patch
|
Patch4: ansible-2.9.23-sphinx4.patch
|
||||||
|
Patch5: hostname-module-support-openEuler.patch
|
||||||
|
|
||||||
Provides: ansible-python3 = %{version}-%{release}
|
Provides: ansible-python3 = %{version}-%{release}
|
||||||
Obsoletes: ansible-python3 < %{version}-%{release}
|
Obsoletes: ansible-python3 < %{version}-%{release}
|
||||||
@ -46,7 +47,6 @@ BuildRequires: python3-straight-plugin
|
|||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
BuildRequires: python3-nose
|
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-pytest-xdist
|
BuildRequires: python3-pytest-xdist
|
||||||
BuildRequires: python3-pytest-mock
|
BuildRequires: python3-pytest-mock
|
||||||
@ -215,6 +215,9 @@ make PYTHON=/usr/bin/python3 tests-py3
|
|||||||
%{python3_sitelib}/ansible_test
|
%{python3_sitelib}/ansible_test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 29 2022 wangkai <wangkai385@h-partners.com> - 2.9.27-2
|
||||||
|
- Hostname module support openEuler and remove python-nose
|
||||||
|
|
||||||
* Tue Apr 26 2022 yangping <yangping69@h-partners.com> - 2.9.27-1
|
* Tue Apr 26 2022 yangping <yangping69@h-partners.com> - 2.9.27-1
|
||||||
- update to 2.9.27
|
- update to 2.9.27
|
||||||
|
|
||||||
|
|||||||
32
hostname-module-support-openEuler.patch
Normal file
32
hostname-module-support-openEuler.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/lib/ansible/module_utils/facts/system/distribution.py b/lib/ansible/module_utils/facts/system/distribution.py
|
||||||
|
index 6a93988f..c3184142 100644
|
||||||
|
--- a/lib/ansible/module_utils/facts/system/distribution.py
|
||||||
|
+++ b/lib/ansible/module_utils/facts/system/distribution.py
|
||||||
|
@@ -467,7 +467,7 @@ class Distribution(object):
|
||||||
|
OS_FAMILY_MAP = {'RedHat': ['RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC',
|
||||||
|
'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS',
|
||||||
|
'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba',
|
||||||
|
- 'AlmaLinux', 'Rocky'],
|
||||||
|
+ 'AlmaLinux', 'Rocky', 'openEuler'],
|
||||||
|
'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',
|
||||||
|
'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux'],
|
||||||
|
'Suse': ['SuSE', 'SLES', 'SLED', 'openSUSE', 'openSUSE Tumbleweed',
|
||||||
|
diff --git a/lib/ansible/modules/system/hostname.py b/lib/ansible/modules/system/hostname.py
|
||||||
|
index 3315cec8..c01d1e62 100644
|
||||||
|
--- a/lib/ansible/modules/system/hostname.py
|
||||||
|
+++ b/lib/ansible/modules/system/hostname.py
|
||||||
|
@@ -787,6 +787,11 @@ class RockyLinuxHostname(Hostname):
|
||||||
|
distribution = 'Rocky'
|
||||||
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
+class OpenEulerHostname(Hostname):
|
||||||
|
+ platform = 'Linux'
|
||||||
|
+ distribution = 'Openeuler'
|
||||||
|
+ strategy_class = SystemdStrategy
|
||||||
|
+
|
||||||
|
def main():
|
||||||
|
module = AnsibleModule(
|
||||||
|
argument_spec=dict(
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user