download: define utility variables (#13521)

local_release_dir has insufficient nuances, as it needs to handle
several cases,
- where to put downloaded artifacts
- where to search for when installing artifacts
- where to search for when using artifacts (passing them via lookup to
  kubectl stdin for instance)

Furthermore, depending on how the user set up download delegation, the
value we want can be on the host the tasks is executing, on the
delegated hosts, etc.

Define variables on top of local_release_dir for differents contexts,
handling which host context to use depending on `download_delegate`.

Mostly, this boils down to choosing the correct `host` for
hostvars[host]['local_release_dir'].
This commit is contained in:
Max Gautier
2026-09-17 08:59:23 +00:00
committed by GitHub
parent f4eaac3a94
commit bd20622a16
3 changed files with 24 additions and 2 deletions
@@ -1,5 +1,4 @@
---
local_release_dir: /tmp/releases
download_cache_dir: /tmp/kubespray_cache
# If this is true, debug information will be displayed but