ansible-nas/roles/stats/molecule/default/verify_stopped.yml
2023-03-10 22:00:37 +01:00

47 lines
1.3 KiB
YAML

---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
include_vars:
file: ../../defaults/main.yml
- name: Try and stop and remove Grafana
docker_container:
name: "{{ stats_grafana_container_name }}"
state: absent
register: result_grafana
- name: Try and stop and remove Prometheus
docker_container:
name: "{{ stats_prometheus_container_name }}"
state: absent
register: result_prometheus
- name: Try and stop and remove Telegraf
docker_container:
name: "{{ stats_telegraf_container_name }}"
state: absent
register: result_telegraf
- name: Try and stop and remove Smartctl
docker_container:
name: "{{ stats_smartctl_container_name }}"
state: absent
register: result_smartctl
- name: Try and stop and remove Speedtest
docker_container:
name: "{{ stats_speedtest_container_name }}"
state: absent
register: result_speedtest
- name: Check if stats containers are stopped
assert:
that:
- not result_grafana.changed
- not result_prometheus.changed
- not result_telegraf.changed
- not result_smartctl.changed
- not result_speedtest.changed