diff --git a/Fix-build-error-for-sphinx-7.0.patch b/Fix-build-error-for-sphinx-7.0.patch
new file mode 100644
index 0000000000000000000000000000000000000000..6ad3963c02a9ecebed4d3fd5fffc76f252b18c0d
--- /dev/null
+++ b/Fix-build-error-for-sphinx-7.0.patch
@@ -0,0 +1,12 @@
+diff -Nur a/docs/docsite/_themes/sphinx_rtd_theme/layout.html b/docs/docsite/_themes/sphinx_rtd_theme/layout.html
+--- a/docs/docsite/_themes/sphinx_rtd_theme/layout.html 2021-10-11 23:18:55.616846800 +0800
++++ b/docs/docsite/_themes/sphinx_rtd_theme/layout.html 2023-08-03 11:26:18.125607871 +0800
+@@ -70,7 +70,7 @@
+
+
+ {# CSS #}
+-
++
+
+
+ {%- for css in css_files %}
diff --git a/ansible.spec b/ansible.spec
index 54ce98560f71c2ac2e7c5e322d9548a973b013f6..b5999c41851c234c55f41c263ae6008ebf040981 100644
--- a/ansible.spec
+++ b/ansible.spec
@@ -2,7 +2,7 @@
Name: ansible
Summary: SSH-based configuration management, deployment, and task execution system
Version: 2.9.27
-Release: 2
+Release: 3
License: GPLv3+
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Patch2: ansible-2.9.6-disable-test_build_requirement_from_path_no_version.patch
Patch3: fix-python-3.9-compatibility.patch
Patch4: ansible-2.9.23-sphinx4.patch
Patch5: hostname-module-support-openEuler.patch
+Patch6: Fix-build-error-for-sphinx-7.0.patch
Provides: ansible-python3 = %{version}-%{release}
Obsoletes: ansible-python3 < %{version}-%{release}
@@ -215,6 +216,9 @@ make PYTHON=/usr/bin/python3 tests-py3
%{python3_sitelib}/ansible_test
%changelog
+* Thu Aug 3 2023 liyanan - 2.9.27-3
+- Fix build error for sphinx 7.0
+
* Fri Apr 29 2022 wangkai - 2.9.27-2
- Hostname module support openEuler and remove python-nose