From 98681bd4d248eb678c2e4847482e74747407c454 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Thu, 4 May 2023 17:03:23 +0200
Subject: [PATCH] Use "#!/usr/bin/env python" for python shebang

ansible is not allowing to use "#!/usr/bin/python".

Due to a change in ansible-lint it is not possible to ignore the "bad"
shebang.
---
 utils/ansible-doc-test            | 2 +-
 utils/ansible-freeipa.spec.in     | 2 +-
 utils/changelog                   | 2 +-
 utils/check_test_configuration.py | 2 +-
 utils/galaxyfy-README.py          | 2 +-
 utils/galaxyfy-module-EXAMPLES.py | 2 +-
 utils/galaxyfy-playbook.py        | 2 +-
 utils/galaxyfy.py                 | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/utils/ansible-doc-test b/utils/ansible-doc-test
index 41afb635..a0d7b2e7 100755
--- a/utils/ansible-doc-test
+++ b/utils/ansible-doc-test
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
diff --git a/utils/ansible-freeipa.spec.in b/utils/ansible-freeipa.spec.in
index 9055ec47..f4d92074 100644
--- a/utils/ansible-freeipa.spec.in
+++ b/utils/ansible-freeipa.spec.in
@@ -125,7 +125,7 @@ done
 
 for i in utils/*.py utils/new_module utils/changelog utils/ansible-doc-test;
 do
-    sed -i '{s@/usr/bin/python*@%{python}@}' $i
+    sed -i '{s@/usr/bin/env python*@%{python}@}' $i
 done
 
 
diff --git a/utils/changelog b/utils/changelog
index 65234ef3..c78c28d8 100755
--- a/utils/changelog
+++ b/utils/changelog
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
diff --git a/utils/check_test_configuration.py b/utils/check_test_configuration.py
index 162ad906..104ede91 100755
--- a/utils/check_test_configuration.py
+++ b/utils/check_test_configuration.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 """Check which tests are scheduled to be executed."""
 
diff --git a/utils/galaxyfy-README.py b/utils/galaxyfy-README.py
index daa45213..0fc5e514 100644
--- a/utils/galaxyfy-README.py
+++ b/utils/galaxyfy-README.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
diff --git a/utils/galaxyfy-module-EXAMPLES.py b/utils/galaxyfy-module-EXAMPLES.py
index 46a740be..a826a270 100644
--- a/utils/galaxyfy-module-EXAMPLES.py
+++ b/utils/galaxyfy-module-EXAMPLES.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
diff --git a/utils/galaxyfy-playbook.py b/utils/galaxyfy-playbook.py
index a0c51c9e..8614e2bf 100644
--- a/utils/galaxyfy-playbook.py
+++ b/utils/galaxyfy-playbook.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
diff --git a/utils/galaxyfy.py b/utils/galaxyfy.py
index 7fef0515..1aae14a9 100644
--- a/utils/galaxyfy.py
+++ b/utils/galaxyfy.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Authors:
-- 
GitLab