diff --git a/roles/mimir/tasks/deploy.yml b/roles/mimir/tasks/deploy.yml index 93385c3d..017c5e26 100644 --- a/roles/mimir/tasks/deploy.yml +++ b/roles/mimir/tasks/deploy.yml @@ -67,16 +67,6 @@ group: "mimir" mode: "0755" -- name: Template Mimir config - /etc/mimir/config.yml - ansible.builtin.template: - src: "config.yml.j2" - dest: "/etc/mimir/config.yml" - owner: "mimir" - group: "mimir" - mode: "0644" - notify: - - Restart mimir - - name: Ensure that Mimir rule path exists ansible.builtin.file: path: "{{ mimir_ruler_alert_path }}" @@ -88,12 +78,27 @@ - mimir_ruler_alert_path is defined - mimir_ruler is defined +- name: Template Mimir config - /etc/mimir/config.yml + ansible.builtin.template: + src: "config.yml.j2" + dest: "/etc/mimir/config.yml" + owner: "mimir" + group: "mimir" + mode: "0644" + validate: "mimir -modules --config.file=%s" + notify: + - Restart mimir + +- name: Ensure restart has completed + ansible.builtin.meta: flush_handlers + - name: Ensure that Mimir is started ansible.builtin.systemd: name: mimir.service state: started enabled: true + - name: Verify that Mimir URL is responding ansible.builtin.uri: url: "http://127.0.0.1:{{ mimir_http_listen_port }}/ready"