mirror of
https://github.com/KevinMidboe/playbooks-retailor.git
synced 2026-09-07 13:32:06 +00:00
configure docker network separately
This commit is contained in:
@@ -6,5 +6,5 @@
|
|||||||
grafana_version: "latest"
|
grafana_version: "latest"
|
||||||
cadvisor_version: "0.46.0"
|
cadvisor_version: "0.46.0"
|
||||||
roles:
|
roles:
|
||||||
# - role: roles/docker
|
- role: roles/docker
|
||||||
- role: roles/prometheus-grafana
|
- role: roles/prometheus-grafana
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Create a Docker network for Elasticsearch
|
|
||||||
docker_network:
|
|
||||||
name: elk_network
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Pull Elasticsearch Docker image
|
- name: Pull Elasticsearch Docker image
|
||||||
docker_image:
|
docker_image:
|
||||||
name: docker.elastic.co/elasticsearch/elasticsearch-wolfi:{{ elk_version }}
|
name: docker.elastic.co/elasticsearch/elasticsearch-wolfi:{{ elk_version }}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
- name: Create a Docker network for Elasticsearch
|
||||||
|
docker_network:
|
||||||
|
name: elk_network
|
||||||
|
state: present
|
||||||
|
driver: bridge
|
||||||
|
ipam_config:
|
||||||
|
- subnet: "172.19.0.0/16"
|
||||||
|
gateway: "172.19.0.1"
|
||||||
|
iprange: "172.19.0.0/24"
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
# ensure we have variables from .env files
|
# ensure we have variables from .env files
|
||||||
- include_tasks: ../roles/env/tasks/main.yml
|
- include_tasks: ../roles/env/tasks/main.yml
|
||||||
|
|
||||||
|
- include_tasks: elk-network.yml
|
||||||
- include_tasks: elasticsearch.yml
|
- include_tasks: elasticsearch.yml
|
||||||
- include_tasks: kibana.yml
|
- include_tasks: kibana.yml
|
||||||
- include_tasks: logstash.yml
|
- include_tasks: logstash.yml
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Create a Docker network for Grafana
|
|
||||||
docker_network:
|
|
||||||
name: monitoring_network
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Create grafana datasources directory on host
|
- name: Create grafana datasources directory on host
|
||||||
file:
|
file:
|
||||||
path: /etc/grafana/datasources
|
path: /etc/grafana/datasources
|
||||||
@@ -87,7 +82,7 @@
|
|||||||
- /etc/grafana/datasources:/etc/grafana/provisioning/datasources
|
- /etc/grafana/datasources:/etc/grafana/provisioning/datasources
|
||||||
- /etc/grafana/dashboards:/etc/grafana/provisioning/dashboards
|
- /etc/grafana/dashboards:/etc/grafana/provisioning/dashboards
|
||||||
networks:
|
networks:
|
||||||
- name: monitoring_network
|
- name: monitoring
|
||||||
env:
|
env:
|
||||||
GF_SECURITY_ADMIN_PASSWORD: "{{ env_vars.GRAFANA_PASSWORD }}" # Customize the password
|
GF_SECURITY_ADMIN_PASSWORD: "{{ env_vars.GRAFANA_PASSWORD }}" # Customize the password
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Create a Docker network for loki
|
|
||||||
docker_network:
|
|
||||||
name: monitoring_network
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Pull loki Docker image
|
- name: Pull loki Docker image
|
||||||
docker_image:
|
docker_image:
|
||||||
name: grafana/loki:latest
|
name: grafana/loki:latest
|
||||||
@@ -33,4 +28,4 @@
|
|||||||
volumes:
|
volumes:
|
||||||
- /etc/loki/config.yml:/etc/loki/config.yml
|
- /etc/loki/config.yml:/etc/loki/config.yml
|
||||||
networks:
|
networks:
|
||||||
- name: monitoring_network
|
- name: monitoring
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# ensure we have variables from .env files
|
# ensure we have variables from .env files
|
||||||
- include_tasks: ../roles/env/tasks/main.yml
|
- include_tasks: ../roles/env/tasks/main.yml
|
||||||
|
|
||||||
|
- include_tasks: monitoring-network.yml
|
||||||
- include_tasks: prometheus.yml
|
- include_tasks: prometheus.yml
|
||||||
- include_tasks: grafana.yml
|
- include_tasks: grafana.yml
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Create a Docker network for Monitoring
|
||||||
|
docker_network:
|
||||||
|
name: monitoring
|
||||||
|
state: present
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Create a Docker network for Prometheus
|
|
||||||
docker_network:
|
|
||||||
name: monitoring_network
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Pull Prometheus Docker image
|
- name: Pull Prometheus Docker image
|
||||||
docker_image:
|
docker_image:
|
||||||
name: prom/prometheus
|
name: prom/prometheus
|
||||||
@@ -32,5 +27,5 @@
|
|||||||
volumes:
|
volumes:
|
||||||
- /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
- /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
networks:
|
networks:
|
||||||
- name: monitoring_network
|
- name: monitoring
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user