diff --git a/.files b/.files
index e23edc5..4547a2e 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index daa4271..cf30b81 100644
--- a/.rev
+++ b/.rev
@@ -875,4 +875,12 @@ numbers for further reference.
901772
+
+ 9d40989a6abbc9ce780fbf865b2003ee
+ 2.9.23
+
+ dimstar_suse
+
+ 906171
+
diff --git a/ansible.changes b/ansible.changes
index 0067430..e63d74b 100644
--- a/ansible.changes
+++ b/ansible.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jul 12 04:59:25 UTC 2021 - Steve Kowalik
+
+- If building with Python 3, change the shebang of the test scripts
+ shipped in ansible-test to be /usr/bin/python3.
+
+-------------------------------------------------------------------
Thu Jun 24 15:46:27 UTC 2021 - Michael Ströder
- recommend installation of python-selinux (boo#1187531)
diff --git a/ansible.spec b/ansible.spec
index 88908eb..c06a034 100644
--- a/ansible.spec
+++ b/ansible.spec
@@ -300,6 +300,12 @@ find contrib/ -type f -exec chmod 644 {} +
find ./ -type f -exec \
sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \;
+# Run test fragments under Python 3, if that is our configured Python.
+%if %{with python3}
+ find test -name '*.py' -exec \
+ sed -i '1s|^\(#!%{_bindir}/python\)$|\13|' {} \;
+%endif
+
%build
%{python} setup.py build
%if 0%{?with_docs}