Added composition.printRunningHost() and used it to encapsulate definition files. Changed current-host to running-host.

This commit is contained in:
m8in
2026-06-24 19:59:29 +02:00
parent 8044d776d8
commit 423d1c38e9
4 changed files with 39 additions and 20 deletions
+5
View File
@@ -91,6 +91,11 @@ function snapshot() {
if [ -n "${_ZFS}" ]; then
(
flock -n 9 || return 1
! composition.shouldRunOnThisHost "${_COMPOSITION}" \
&& printf -- "ZFS will be skipped, because this host '%b' is not running the composition:\n" "${CIS[HOST]}" >&2 \
&& printf -- " - Composition : %b\n" "${_COMPOSITION}" >&2 \
&& printf -- " - Running host: %b\n" "$(composition.printRunningHost "${_COMPOSITION}")" >&2 \
&& continue
case "${_MODE:?"Missing MODE"}" in
MINUTELY) zfs snapshot "${_ZFS}@SNAPMINUTELY_${_MINUTE}" 2> /dev/null \