21 lines
662 B
YAML
Raw Normal View History

---
- name: Check existence of matrix-prometheus service
2022-07-18 11:22:05 +03:00
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service"
register: matrix_prometheus_service_stat
- when: matrix_prometheus_service_stat.stat.exists | bool
block:
- name: Ensure matrix-prometheus is stopped
ansible.builtin.service:
name: matrix-prometheus
state: stopped
enabled: false
daemon_reload: true
- name: Ensure matrix-prometheus.service doesn't exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service"
state: absent