disable.yml (436B)
1 --- 2 - name: Get the list of services 3 service_facts: 4 5 - name: Stop and disable existing monitoring services 6 service: 7 name: "{{ item }}" 8 state: stopped 9 enabled: false 10 loop: 11 - alloy.service 12 - prometheus-node-exporter.service 13 - prometheus-nginx-exporter.service 14 - prometheus-postgres-exporter.service 15 - prometheus-alertmanager.service 16 - prometheus.service 17 when: item in ansible_facts["services"]