diff --git a/playbooks/prod_db.yml b/playbooks/prod_db.yml index e890a86..0e17787 100755 --- a/playbooks/prod_db.yml +++ b/playbooks/prod_db.yml @@ -8,6 +8,7 @@ ansible.builtin.docker_container: name: prometheus-psql-exporter image: quay.io/prometheuscommunity/postgres-exporter + restart_policy: unless-stopped env: DATA_SOURCE_URI: "10.0.0.2:5432/postgres" DATA_SOURCE_USER: "nagios" diff --git a/playbooks/tags_nagios.yml b/playbooks/tags_nagios.yml index bcd828a..32c80c7 100755 --- a/playbooks/tags_nagios.yml +++ b/playbooks/tags_nagios.yml @@ -40,6 +40,7 @@ ansible.builtin.docker_container: name: prometheus-node-exporter image: quay.io/prometheus/node-exporter:latest + restart_policy: unless-stopped command: - '--path.rootfs=/host' - '--collector.interrupts' @@ -53,6 +54,7 @@ ansible.builtin.docker_container: name: prometheus-cadvisor-exporter image: gcr.io/cadvisor/cadvisor:latest + restart_policy: unless-stopped ports: - 9101:8080/tcp volumes: diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index 3d522d9..36d4dea 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -24,6 +24,7 @@ community.docker.docker_container: name: prometheus image: prom/prometheus:latest + restart_policy: unless-stopped user: 5476:5476 env: TZ: "America/Chicago" @@ -55,6 +56,7 @@ community.docker.docker_container: name: prometheus-blackbox image: quay.io/prometheus/blackbox-exporter:latest + restart_policy: unless-stopped user: 5476:5476 command: - '--config.file=/config/blackbox.yml'