From 151c0adf885c203fce1634133038500f800c2971 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Jan 2024 15:48:18 +0100 Subject: [PATCH] elk-filebeat-cli filebeat.yml --- roles/elk-filebeat-cli/defaults/main.yml | 2 +- roles/elk-filebeat-cli/tasks/main.yml | 26 ++++++++++++++++++------ s-infra.yml | 5 +++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/roles/elk-filebeat-cli/defaults/main.yml b/roles/elk-filebeat-cli/defaults/main.yml index ea87edf..e5a14ac 100644 --- a/roles/elk-filebeat-cli/defaults/main.yml +++ b/roles/elk-filebeat-cli/defaults/main.yml @@ -1 +1 @@ -BEATVER: "8.11.5" +BEATVER: "8.11.4" diff --git a/roles/elk-filebeat-cli/tasks/main.yml b/roles/elk-filebeat-cli/tasks/main.yml index 7330c1d..26b000f 100644 --- a/roles/elk-filebeat-cli/tasks/main.yml +++ b/roles/elk-filebeat-cli/tasks/main.yml @@ -1,17 +1,31 @@ --- - name: Récupération de filebeat get_url: - url: http://s-adm.gsb.adm/gsbstore/filebeat-${BEATVAR}-amd64.deb + url: "http://s-adm.gsb.adm/gsbstore/filebeat-{{ BEATVER }}-amd64.deb" dest: /tmp/ - name: Installation de filebeat apt: - deb: /tmp/filebeat-${BEATVEAR}-amd64.deb + deb: "/tmp/filebeat-{{ BEATVER }}-amd64.deb" -- name: Changement du fichier de conf - copy: - src: filebeat.yml - dest: /etc/filebeat/filebeat.yml +- name: Chgt filebeat.yml - localhost:9200 - Elastic + replace: + path: /etc/filebeat/filebeat.yml + regexp: 'localhost:9200' + replace: 's-elk.gsb.adm:9200' + backup: yes + +- name: Chgt filebeat.yml - localhost:5601 - Kibana + replace: + path: /etc/filebeat/filebeat.yml + regexp: 'localhost:5601' + replace: 's-elk.gsb.adm:5601' + backup: yes + + #- name: Changement du fichier de conf + # copy: + # src: filebeat.yml + # dest: /etc/filebeat/filebeat.yml - name: Configuration de filebeat shell: filebeat modules enable system diff --git a/s-infra.yml b/s-infra.yml index 70686a2..316d2d9 100644 --- a/s-infra.yml +++ b/s-infra.yml @@ -4,11 +4,12 @@ # include: config.yml roles: - base - - zabbix-cli + # - zabbix-cli - goss - dns-master - webautoconf - - journald-snd + - elk-filebeat-cli + # - journald-snd - ssh-cli - post