ansible playbooks for retailor.io infrastructure

This commit is contained in:
2025-03-03 19:33:36 +01:00
committed by KevinMidboe
commit 92cb10ba27
139 changed files with 33603 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
---
- name: Create a Docker network for loki
docker_network:
name: monitoring_network
state: present
- name: Pull loki Docker image
docker_image:
name: grafana/loki:latest
source: pull
- name: Create loki configuration file directory on host
file:
path: /etc/loki
state: directory
mode: '0755'
- name: Create loki configuration file
template:
src: loki.yml.j2
dest: /etc/loki/config.yml
- name: Start loki container
docker_container:
name: loki
image: grafana/loki
state: started
restart: yes
command: -config.file=/etc/loki/config.yml
restart_policy: unless-stopped
published_ports:
- "3100:3100"
volumes:
- /etc/loki/config.yml:/etc/loki/config.yml
networks:
- name: monitoring_network