diff options
Diffstat (limited to 'test/lib/ansible_test/_internal/core_ci.py')
-rw-r--r-- | test/lib/ansible_test/_internal/core_ci.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/core_ci.py b/test/lib/ansible_test/_internal/core_ci.py index 62d063b2b7..ee9520dd9b 100644 --- a/test/lib/ansible_test/_internal/core_ci.py +++ b/test/lib/ansible_test/_internal/core_ci.py @@ -6,6 +6,7 @@ import dataclasses import json import os import re +import stat import traceback import uuid import errno @@ -47,6 +48,7 @@ from .ci import ( from .data import ( data_context, + PayloadConfig, ) @@ -447,14 +449,19 @@ class SshKey: key, pub = key_pair key_dst, pub_dst = self.get_in_tree_key_pair_paths() - def ssh_key_callback(files): # type: (t.List[t.Tuple[str, str]]) -> None + def ssh_key_callback(payload_config: PayloadConfig) -> None: """ Add the SSH keys to the payload file list. They are either outside the source tree or in the cache dir which is ignored by default. """ + files = payload_config.files + permissions = payload_config.permissions + files.append((key, os.path.relpath(key_dst, data_context().content.root))) files.append((pub, os.path.relpath(pub_dst, data_context().content.root))) + permissions[os.path.relpath(key_dst, data_context().content.root)] = stat.S_IRUSR | stat.S_IWUSR + data_context().register_payload_callback(ssh_key_callback) self.key, self.pub = key, pub |