- name: Ensure VictoriaMetrics service is enabled on boot
become: true
systemd:
name: victoriametrics
enabled: true
state: started
when: config_template is changed
but in vmalert
- name: Ensure VMalert service is enabled on boot
become: true
systemd:
name: vic-vmalert
enabled: true
state: restarted
when: config_template is changed
when:
- ansible_service_mgr == "systemd"
ansible output
....
TASK [single : Copy VictoriaMetrics systemd unit file] **********************************************************************************************************************************************************************************************
changed: [vm-single]
TASK [single : daemon-reload VictoriaMetrics service] ***********************************************************************************************************************************************************************************************
ok: [vm-single]
TASK [single : Ensure VictoriaMetrics service is enabled on boot] ***********************************************************************************************************************************************************************************
ok: [vm-single]
.....
TASK [vmalert : systemd | Copy VMalert systemd unit file] *******************************************************************************************************************************************************************************************
changed: [vm-single]
TASK [vmalert : systemd | daemon-reload VMalert service] ********************************************************************************************************************************************************************************************
ok: [vm-single]
TASK [vmalert : Ensure VMalert service is enabled on boot] ******************************************************************************************************************************************************************************************
changed: [vm-single]
in vmsingle tasks
but in vmalert
ansible output ....
handlers no running