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