|
|
@ -2,6 +2,9 @@
|
|
|
|
hosts: lotus-land-story
|
|
|
|
hosts: lotus-land-story
|
|
|
|
vars_files:
|
|
|
|
vars_files:
|
|
|
|
- vars.yml
|
|
|
|
- vars.yml
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
|
|
prometheus_version: v2.43.0
|
|
|
|
|
|
|
|
cadvisor_version: v0.49.1
|
|
|
|
tasks:
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install host exporters
|
|
|
|
- name: Install host exporters
|
|
|
@ -54,10 +57,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run Prometheus
|
|
|
|
- name: Run Prometheus
|
|
|
|
community.docker.docker_container:
|
|
|
|
community.docker.docker_container:
|
|
|
|
# recreate: true
|
|
|
|
|
|
|
|
# restart: true
|
|
|
|
|
|
|
|
name: prometheus
|
|
|
|
name: prometheus
|
|
|
|
image: prom/prometheus:v2.43.0
|
|
|
|
image: prom/prometheus:{{ prometheus_version }}
|
|
|
|
command:
|
|
|
|
command:
|
|
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
|
|
- --storage.tsdb.retention.size=5GB
|
|
|
|
- --storage.tsdb.retention.size=5GB
|
|
|
@ -74,4 +75,18 @@
|
|
|
|
etc_hosts:
|
|
|
|
etc_hosts:
|
|
|
|
host.docker.internal: host-gateway
|
|
|
|
host.docker.internal: host-gateway
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run cAdvisor
|
|
|
|
|
|
|
|
community.docker.docker_container:
|
|
|
|
|
|
|
|
name: cadvisor
|
|
|
|
|
|
|
|
image: gcr.io/cadvisor/cadvisor:{{ cadvisor_version }}
|
|
|
|
|
|
|
|
restart: true
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
|
|
- /:/rootfs:ro
|
|
|
|
|
|
|
|
- /var/run:/var/run:rw
|
|
|
|
|
|
|
|
- /sys:/sys:ro
|
|
|
|
|
|
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
|
|
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
|
|
|
- name: lotus_land_story
|
|
|
|
|
|
|
|
|
|
|
|
# vim: ft=yaml.ansible
|
|
|
|
# vim: ft=yaml.ansible
|
|
|
|