Fix relative paths in copy hook

This commit is contained in:
Joshua Boniface 2022-07-06 22:25:25 +00:00
parent 26c86a40fd
commit 0565a6b635
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,8 @@ def run_hook_copy(config, targets, args):
node_address = node.host_ipaddr node_address = node.host_ipaddr
source = args.get("source", []) source = args.get("source", [])
if not match(r"^/", source):
source = f"{config['ansible_source']}/{source}"
destination = args.get("destination", []) destination = args.get("destination", [])
mode = args.get("mode", []) mode = args.get("mode", [])