mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-27 18:55:17 +00:00
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
|
---
|
||
|
- name: Verify
|
||
|
hosts: all
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
|
- name: Include vars
|
||
|
include_vars:
|
||
|
file: ../../defaults/main.yml
|
||
|
|
||
|
- name: Get Grafana container state
|
||
|
docker_container_info:
|
||
|
name: "{{ stats_grafana_container_name }}"
|
||
|
register: result_grafana
|
||
|
|
||
|
- name: Get Prometheus container state
|
||
|
docker_container_info:
|
||
|
name: "{{ stats_prometheus_container_name }}"
|
||
|
register: result_prometheus
|
||
|
|
||
|
- name: Get Telegraf container state
|
||
|
docker_container_info:
|
||
|
name: "{{ stats_telegraf_container_name }}"
|
||
|
register: result_telegraf
|
||
|
|
||
|
- name: Get Smartctl container state
|
||
|
docker_container_info:
|
||
|
name: "{{ stats_smartctl_container_name }}"
|
||
|
register: result_smartctl
|
||
|
|
||
|
- name: Get Speedtest container state
|
||
|
docker_container_info:
|
||
|
name: "{{ stats_speedtest_container_name }}"
|
||
|
register: result_speedtest
|
||
|
|
||
|
- name: Check if stats docker containers are running
|
||
|
assert:
|
||
|
that:
|
||
|
- result_grafana.container['State']['Status'] == "running"
|
||
|
- result_grafana.container['State']['Restarting'] == false
|
||
|
- result_prometheus.container['State']['Status'] == "running"
|
||
|
- result_prometheus.container['State']['Restarting'] == false
|
||
|
- result_telegraf.container['State']['Status'] == "running"
|
||
|
- result_telegraf.container['State']['Restarting'] == false
|
||
|
- result_smartctl.container['State']['Status'] == "running"
|
||
|
- result_smartctl.container['State']['Restarting'] == false
|
||
|
- result_speedtest.container['State']['Status'] == "running"
|
||
|
- result_speedtest.container['State']['Restarting'] == false
|