Update file main.yml
This commit is contained in:
parent
b6d059aea1
commit
95ad706d61
@ -17,7 +17,7 @@
|
||||
- "{{ promtail_config_dir }}"
|
||||
become: yes
|
||||
|
||||
- name: Create ALL Loki internal directories with correct permissions
|
||||
- name: Create Loki internal directories with correct permissions
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
@ -88,18 +88,42 @@
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Wait for Loki port to be available
|
||||
wait_for:
|
||||
host: "{{ ansible_default_ipv4.address }}"
|
||||
port: "{{ monitoring_ports.loki }}"
|
||||
timeout: 120
|
||||
state: started
|
||||
delay: 10
|
||||
become: no
|
||||
|
||||
- name: Check Loki container status
|
||||
community.docker.docker_container_info:
|
||||
name: loki
|
||||
register: loki_container_info
|
||||
become: yes
|
||||
|
||||
- name: Show Loki status
|
||||
debug:
|
||||
msg: "Loki is running and responding on port {{ loki_port }}"
|
||||
when: loki_ready_check.status == 200
|
||||
msg: "✅ Loki is running and available on port {{ monitoring_ports.loki }}. Container status: {{ loki_container_info.container.State.Status }}"
|
||||
|
||||
- name: Check Loki services status
|
||||
- name: Check Promtail container status
|
||||
community.docker.docker_container_info:
|
||||
name: promtail
|
||||
register: promtail_container_info
|
||||
become: yes
|
||||
|
||||
- name: Show Promtail status
|
||||
debug:
|
||||
msg: "✅ Promtail is running. Container status: {{ promtail_container_info.container.State.Status }}"
|
||||
|
||||
- name: Verify Loki stack services
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ loki_base_dir }}"
|
||||
state: present
|
||||
register: loki_services_status
|
||||
become: yes
|
||||
|
||||
- name: Display Loki services status
|
||||
- name: Display Loki stack status
|
||||
debug:
|
||||
msg: "Loki stack services status: {{ loki_services_status }}"
|
||||
msg: "Loki stack services: {{ loki_services_status.services }}"
|
||||
Loading…
Reference in New Issue
Block a user