From 43362e169475a57f3791fe1503134475c37671a3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 16 Aug 2025 18:03:32 +0200 Subject: [PATCH] Optimized sys-hlth-csp performance --- roles/sys-hlth-csp/handlers/main.yml | 7 +++++++ roles/sys-hlth-csp/tasks/01_core.yml | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/sys-hlth-csp/handlers/main.yml b/roles/sys-hlth-csp/handlers/main.yml index a910a5a0..c81f432d 100644 --- a/roles/sys-hlth-csp/handlers/main.yml +++ b/roles/sys-hlth-csp/handlers/main.yml @@ -3,3 +3,10 @@ name: sys-hlth-csp{{ SYS_SERVICE_SUFFIX }} enabled: yes daemon_reload: yes + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" + +- name: rebuild checkcsp docker image + shell: checkcsp build + async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}" + poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}" diff --git a/roles/sys-hlth-csp/tasks/01_core.yml b/roles/sys-hlth-csp/tasks/01_core.yml index 56c928c6..65cb6606 100644 --- a/roles/sys-hlth-csp/tasks/01_core.yml +++ b/roles/sys-hlth-csp/tasks/01_core.yml @@ -8,10 +8,7 @@ name: pkgmgr-install vars: package_name: checkcsp - -- name: rebuild checkcsp docker image - shell: checkcsp build - # Todo this could be optimized in the future + package_notify: rebuild checkcsp docker image - name: "create {{ health_csp_crawler_folder }}" file: