VictoriaMetrics / ansible-playbooks

Ansible Playbooks for Victoria Metrics monorepo
Apache License 2.0
99 stars 34 forks source link

vmsingle not restart after changes in systems unit files #38

Closed proffust closed 1 year ago

proffust commented 1 year ago

in vmsingle tasks

- 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]

handlers no running

zekker6 commented 1 year ago

@proffust Please, check 0.23.3 version, it includes fix for this issue.