From 71f033b7c220d675e46fd8fbcc07e7a18b184442 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 30 Jan 2021 17:31:05 +0100 Subject: [PATCH] bundles/icinga2: fix dependencies for svc_systemd:icinga2 icinga2 runs fine without any checks, so we now only depend on the other configuration files managed by bw. This will also fix unwanted dependencies, because 'file:' means *all* files, not only those provided by this bundle. In the past, it wasn't possible to skip any file, because that would result in icinga not properly restarting. --- bundles/icinga2/items.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/bundles/icinga2/items.py b/bundles/icinga2/items.py index d08918d..cae37d6 100644 --- a/bundles/icinga2/items.py +++ b/bundles/icinga2/items.py @@ -260,14 +260,22 @@ for feature in ENABLED_FEATURES: }, } +icinga_run_deps = { + 'pkg_apt:icinga2', + 'pkg_apt:icinga2-ido-pgsql', +} +for name in actions.keys(): + icinga_run_deps.add(f'action:{name}') +for name in directories.keys(): + icinga_run_deps.add(f'directory:{name}') +for name in files.keys(): + icinga_run_deps.add(f'file:{name}') +for name in symlinks.keys(): + icinga_run_deps.add(f'symlink:{name}') + svc_systemd = { 'icinga2': { - 'needs': { - 'action:icinga2_api_setup', - 'file:', - 'pkg_apt:', - 'symlink:', - }, + 'needs': icinga_run_deps, }, 'icinga_statusmonitor': { 'needs': {