summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/payload.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/ansible_test/_internal/payload.py')
-rw-r--r--test/lib/ansible_test/_internal/payload.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lib/ansible_test/_internal/payload.py b/test/lib/ansible_test/_internal/payload.py
index 9bb234faec..91937a1883 100644
--- a/test/lib/ansible_test/_internal/payload.py
+++ b/test/lib/ansible_test/_internal/payload.py
@@ -48,6 +48,14 @@ def create_payload(args, dst_path): # type: (CommonConfig, str) -> None
permissions: dict[str, int] = {}
filters: dict[str, t.Callable[[tarfile.TarInfo], t.Optional[tarfile.TarInfo]]] = {}
+ # Exclude vendored files from the payload.
+ # They may not be compatible with the delegated environment.
+ files = [
+ (abs_path, rel_path) for abs_path, rel_path in files
+ if not rel_path.startswith('lib/ansible/_vendor/')
+ or rel_path == 'lib/ansible/_vendor/__init__.py'
+ ]
+
def apply_permissions(tar_info: tarfile.TarInfo, mode: int) -> t.Optional[tarfile.TarInfo]:
"""
Apply the specified permissions to the given file.