mirror of
https://github.com/m8tin/cis.git
synced 2026-08-01 11:47:31 +02:00
Added composition.printRunningHost() and used it to encapsulate definition files. Changed current-host to running-host.
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user