From 9c477ddacc9f6d6ca553c5c8945036392f0d7896 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 20 Dec 2023 11:12:46 +0100 Subject: [PATCH 1/2] restart cnspec everytime the playbook is executed to ensure correct version number reported --- tasks/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 88ab6245a59faa25cdb5d422058a74c96ce27d34 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 20 Dec 2023 11:55:12 +0100 Subject: [PATCH 2/2] restart cnspec everytime playbook is executed on linux --- tasks/linux_login.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }}"