diff --git a/utils/get_test_modules.py b/infra/azure/scripts/get_test_modules.py
similarity index 98%
rename from utils/get_test_modules.py
rename to infra/azure/scripts/get_test_modules.py
index 3e9306b0dd600038430c6270e65266be18590465..ff4c97043e4c6da50710f40dee07b0afdda49dd9 100644
--- a/utils/get_test_modules.py
+++ b/infra/azure/scripts/get_test_modules.py
@@ -159,7 +159,7 @@ def map_test_module_sources(base):
     """Create a map of 'test-modules' to 'plugin-sources', from 'base'."""
     # Find root directory of playbook tests.
     script_dir = os.path.dirname(__file__)
-    test_root = os.path.realpath(os.path.join(script_dir, f"../{base}"))
+    test_root = os.path.realpath(os.path.join(script_dir, f"../../../{base}"))
     # create modules:source_files map
     _result = {}
     for test_module in [d for d in os.scandir(test_root) if d.is_dir()]:
@@ -170,7 +170,7 @@ def map_test_module_sources(base):
 
 
 def usage(err=0):
-    print("filter_plugins.py [-h|--help] [-p|--pytest] PY_SRC...")
+    print("get_test_modules.py [-h|--help] [-p|--pytest] PY_SRC...")
     print(
         """
 Print a comma-separated list of modules that should be tested if
diff --git a/utils/set_test_modules b/infra/azure/scripts/set_test_modules
similarity index 90%
rename from utils/set_test_modules
rename to infra/azure/scripts/set_test_modules
index f9f1d91e4a1effb9376598f2859f0b5ad9cff930..de09e07c6f6fbfba47acaeb4b77d824a5c00fd6e 100644
--- a/utils/set_test_modules
+++ b/infra/azure/scripts/set_test_modules
@@ -11,7 +11,8 @@ die() {
     echo -e "${RED}${*}${RST}" >&2
 }
 
-TOPDIR="$(dirname "${BASH_SOURCE[0]}")/.."
+BASEDIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
+TOPDIR="$(readlink -f "${BASEDIR}/../../..")"
 
 [ -n "$(command -v python3)" ] && python="$(command -v python3)" || python="$(command -v python2)"
 
@@ -41,7 +42,7 @@ then
     git remote remove "${remote}"
 
     # shellcheck disable=SC2046
-    enabled_modules="$(${python} utils/get_test_modules.py $(cat "${files_list}"))"
+    enabled_modules="$(${python} "${BASEDIR}/get_test_modules.py" $(cat "${files_list}"))"
     [ -z "${enabled_modules}" ] && enabled_modules="None"
 
     # Get individual tests that should be executed
diff --git a/infra/azure/templates/run_tests.yml b/infra/azure/templates/run_tests.yml
index 1cc00030bf597ebf39ee03b1916ce7ae99b656c2..ef5c4ff9af97e85f1b388641d0039edc3f5281ea 100644
--- a/infra/azure/templates/run_tests.yml
+++ b/infra/azure/templates/run_tests.yml
@@ -46,7 +46,7 @@ jobs:
     displayName: Set repo rootdir
 
   - script: |
-      . "${TOPDIR}/utils/set_test_modules"
+      . "${TOPDIR}/infra/azure/scripts/set_test_modules"
       python3 utils/check_test_configuration.py ${{ parameters.distro }}
     displayName: Check test configuration
     env:
@@ -65,7 +65,7 @@ jobs:
       echo "ROLES: ${ANSIBLE_ROLES_PATH}"
       echo "LIBRARY: ${ANSIBLE_LIBRARY}"
       echo "MODULE_UTILS: ${ANSIBLE_MODULE_UTILS}"
-      . "${TOPDIR}/utils/set_test_modules"
+      . "${TOPDIR}/infra/azure/scripts/set_test_modules"
       [ "${{ parameters.test_galaxy }}" == "True"  ] && cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa
       pytest \
           -m "${{ parameters.test_type }}" \