From f3e964a3e2a613cb1844f8affdbdc75bd110a8c0 Mon Sep 17 00:00:00 2001 From: Christian Gross Date: Wed, 20 Dec 2023 15:10:47 +0100 Subject: [PATCH] Ensure cnspec service is always restarted --- tasks/linux_login.yml | 2 +- tasks/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/linux_login.yml b/tasks/linux_login.yml index f31707e..91b0d51 100644 --- a/tasks/linux_login.yml +++ b/tasks/linux_login.yml @@ -71,7 +71,7 @@ - name: Ensure cnspec service is enabled and running ansible.builtin.systemd: name: cnspec.service - state: started + state: restarted daemon_reload: yes enabled: yes become: "{{ use_become }}" diff --git a/tasks/windows.yml b/tasks/windows.yml index 9b9686a..a4db92a 100644 --- a/tasks/windows.yml +++ b/tasks/windows.yml @@ -90,7 +90,7 @@ ansible.windows.win_service: name: Mondoo start_mode: auto - state: started + state: restarted when: not ansible_check_mode - name: Ensure cnquery and cnspec are managed