From 0565a6b635265a61b266ff448b854886a28701eb Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 6 Jul 2022 22:25:25 +0000 Subject: [PATCH] Fix relative paths in copy hook --- bootstrap-daemon/pvcbootstrapd/lib/hooks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-daemon/pvcbootstrapd/lib/hooks.py b/bootstrap-daemon/pvcbootstrapd/lib/hooks.py index d5167dc..e9d44ef 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/hooks.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/hooks.py @@ -203,6 +203,8 @@ def run_hook_copy(config, targets, args): node_address = node.host_ipaddr source = args.get("source", []) + if not match(r"^/", source): + source = f"{config['ansible_source']}/{source}" destination = args.get("destination", []) mode = args.get("mode", [])