2022-08-22 23:56:02 +00:00
|
|
|
---
|
2023-03-10 21:00:37 +00:00
|
|
|
- name: Start Exporters
|
|
|
|
block:
|
|
|
|
- name: Smartctl Exporter Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: "{{ stats_smartctl_container_name }}"
|
|
|
|
image: "{{ stats_smartctl_docker_image_name }}:{{ stats_smartctl_docker_image_version }}"
|
|
|
|
container_default_behavior: no_defaults
|
|
|
|
pull: true
|
|
|
|
privileged: true
|
|
|
|
ports:
|
|
|
|
- "{{ stats_prometheus_smartctl_port }}:9902"
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: "{{ stats_prometheus_smartctl_memory }}"
|
2022-08-22 23:56:02 +00:00
|
|
|
|
2023-03-10 21:00:37 +00:00
|
|
|
- name: Speedtest Exporter Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: "{{ stats_speedtest_container_name }}"
|
|
|
|
image: "{{ stats_speedtest_docker_image_name }}:{{ stats_speedtest_docker_image_version }}"
|
|
|
|
container_default_behavior: no_defaults
|
|
|
|
pull: true
|
|
|
|
ports:
|
|
|
|
"{{ stats_speedtest_exporter_port }}:9798"
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: "{{ stats_speedtest_exporter_memory }}"
|
|
|
|
when: stats_internet_speed_test_enabled
|
|
|
|
when: stats_enabled is true
|
|
|
|
|
|
|
|
- name: Stop Exporters
|
|
|
|
block:
|
|
|
|
- name: Stop Smartctl Exporter
|
|
|
|
docker_container:
|
|
|
|
name: "{{ stats_smartctl_container_name }}"
|
|
|
|
state: absent
|
|
|
|
- name: Stop Speedtest Exporter
|
|
|
|
docker_container:
|
|
|
|
name: "{{ stats_speedtest_container_name }}"
|
|
|
|
state: absent
|
|
|
|
when: stats_enabled is false
|