2023-03-10 21:00:37 +00:00
|
|
|
---
|
|
|
|
- name: Verify
|
|
|
|
hosts: all
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2023-04-12 22:29:29 +00:00
|
|
|
- ansible.builtin.include_vars:
|
2023-03-10 21:00:37 +00:00
|
|
|
file: ../../defaults/main.yml
|
|
|
|
|
|
|
|
- name: Try and stop and remove Grafana
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2023-03-10 21:00:37 +00:00
|
|
|
name: "{{ stats_grafana_container_name }}"
|
|
|
|
state: absent
|
|
|
|
register: result_grafana
|
|
|
|
|
|
|
|
- name: Try and stop and remove Prometheus
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2023-03-10 21:00:37 +00:00
|
|
|
name: "{{ stats_prometheus_container_name }}"
|
|
|
|
state: absent
|
|
|
|
register: result_prometheus
|
|
|
|
|
|
|
|
- name: Try and stop and remove Telegraf
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2023-03-10 21:00:37 +00:00
|
|
|
name: "{{ stats_telegraf_container_name }}"
|
|
|
|
state: absent
|
|
|
|
register: result_telegraf
|
|
|
|
|
|
|
|
- name: Try and stop and remove Smartctl
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2023-03-10 21:00:37 +00:00
|
|
|
name: "{{ stats_smartctl_container_name }}"
|
|
|
|
state: absent
|
|
|
|
register: result_smartctl
|
|
|
|
|
|
|
|
- name: Try and stop and remove Speedtest
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2023-03-10 21:00:37 +00:00
|
|
|
name: "{{ stats_speedtest_container_name }}"
|
|
|
|
state: absent
|
|
|
|
register: result_speedtest
|
|
|
|
|
|
|
|
- name: Check if stats containers are stopped
|
2023-04-12 22:29:29 +00:00
|
|
|
ansible.builtin.assert:
|
2023-03-10 21:00:37 +00:00
|
|
|
that:
|
|
|
|
- not result_grafana.changed
|
|
|
|
- not result_prometheus.changed
|
|
|
|
- not result_telegraf.changed
|
|
|
|
- not result_smartctl.changed
|
|
|
|
- not result_speedtest.changed
|