From b90ce7eea68412ef2adb2866ce3f2c8bb671ba73 Mon Sep 17 00:00:00 2001 From: master of disaster Date: Sat, 20 Dec 2025 01:27:49 +0100 Subject: [PATCH] modified: playbooks/deploy_victorialogs.yml.ansible modified: playbooks/deploy_victoriametrics.yml.ansible modified: requirements.yml --- playbooks/deploy_victorialogs.yml.ansible | 25 ++++++++++++ playbooks/deploy_victoriametrics.yml.ansible | 40 ++------------------ requirements.yml | 6 +++ 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/playbooks/deploy_victorialogs.yml.ansible b/playbooks/deploy_victorialogs.yml.ansible index 04551a9..b6455c3 100644 --- a/playbooks/deploy_victorialogs.yml.ansible +++ b/playbooks/deploy_victorialogs.yml.ansible @@ -4,4 +4,29 @@ become: true roles: - victorialogs + - handlers +- hosts: + - grafana_servers + gather_facts: true + become: true + tasks: + - name: add datasources VictoriaLogs + ansible.builtin.include_role: + name: grafana + tasks_from: add_datasources.yml.ansible + vars: + grafana_datasources: + - name: "VictoriaLogs" + type: "loki" + url: "http://{{ hostvars[groups['victorialogs_servers'][0]]['victorialogs_ethernet_vip'] }}:9428" + access: "proxy" + is_default: false + version: 1 + editable: false +- hosts: + - dev + gather_facts: true + become: true + roles: + - fluentbit - handlers \ No newline at end of file diff --git a/playbooks/deploy_victoriametrics.yml.ansible b/playbooks/deploy_victoriametrics.yml.ansible index fe16242..58a9fa2 100644 --- a/playbooks/deploy_victoriametrics.yml.ansible +++ b/playbooks/deploy_victoriametrics.yml.ansible @@ -1,31 +1,11 @@ - hosts: - - valkey - gather_facts: true - become: true - roles: - - valkeys - - handlers -- name: Gather facts from all hosts - hosts: dev - gather_facts: true - become: true - roles: - - common -- hosts: - victoriametrics_servers gather_facts: true become: true roles: - - handlers - - minio - victoriametrics -- hosts: - - grafana_servers - gather_facts: true - become: true - roles: - - grafana - handlers + - hosts: - grafana_servers gather_facts: true @@ -33,28 +13,16 @@ tasks: - name: add datasources VictoriaMetrics ansible.builtin.include_role: - name: grafana + name: handlers tasks_from: add_datasources.yml.ansible vars: grafana_datasources: - name: "VictoriaMetrics" type: "prometheus" - url: "http://{{ victoriametrics_eth_vip }}:8428" + url: "http://{{ hostvars[groups['victoriametrics_servers'][0]]['victoriametrics_eth_vip'] }}:8428" access: "proxy" is_default: true version: 1 editable: false - - name: add datasources VictoriaLogs - ansible.builtin.include_role: - name: grafana - tasks_from: add_datasources.yml.ansible - vars: - grafana_datasources: - - name: "VictoriaLogs" - type: "loki" - url: "http://{{ victorialogs_ethernet_vip }}:9428" - access: "proxy" - is_default: false - version: 1 - editable: false + diff --git a/requirements.yml b/requirements.yml index 1237b96..92c4cdf 100644 --- a/requirements.yml +++ b/requirements.yml @@ -72,3 +72,9 @@ src: git+ssh://gitea@gitea.mod.home/ansible-monitoring/victorialogs.git scm: git version: main + +# fluentbit +- name: fluentbit + src: git+ssh://gitea@gitea.mod.home:2222/ansible-monitoring/fluentbit.git + scm: git + version: main \ No newline at end of file