From e9b0ad453be0897e27378a64f0e7b24ba716f644 Mon Sep 17 00:00:00 2001 From: Anthony Arnoux Date: Thu, 2 Feb 2023 11:26:00 +0100 Subject: [PATCH] filebeat metricbeat bonne version et instdepl aussi --- pre/inst-depl | 4 +++- roles/filebeat-cli/defaults/main.yml | 1 + roles/filebeat-cli/handlers/main.yml | 2 +- roles/filebeat-cli/tasks/main.yml | 8 ++++---- roles/metricbeat-cli/defaults/main.yml | 1 + roles/metricbeat-cli/handlers/main.yml | 4 ++-- roles/metricbeat-cli/tasks/main.yml | 8 ++++---- 7 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 roles/filebeat-cli/defaults/main.yml create mode 100644 roles/metricbeat-cli/defaults/main.yml diff --git a/pre/inst-depl b/pre/inst-depl index 95b160d..d37f6dd 100644 --- a/pre/inst-depl +++ b/pre/inst-depl @@ -45,7 +45,9 @@ str6="curl -L https://github.com/aelsabbahy/goss/releases/download/${GOSSVER}/go #str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=${GESTSUPREL}&type=gestsup' -O gestsup_${GESTSUPREL}.zip" str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=3.2.30&type=gestsup' -O gestsup_3.2.30.zip" -ELKREL=8.6.0 + +#METRICBEAT ET FILEBEAT +ELKREL=8.5.3 str81="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-amd64.deb" str82="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-windows-x86_64.zip" diff --git a/roles/filebeat-cli/defaults/main.yml b/roles/filebeat-cli/defaults/main.yml new file mode 100644 index 0000000..6d40b5c --- /dev/null +++ b/roles/filebeat-cli/defaults/main.yml @@ -0,0 +1 @@ +BEATVER: "8.5.3" diff --git a/roles/filebeat-cli/handlers/main.yml b/roles/filebeat-cli/handlers/main.yml index e1054ad..d63c48b 100644 --- a/roles/filebeat-cli/handlers/main.yml +++ b/roles/filebeat-cli/handlers/main.yml @@ -1,4 +1,4 @@ -- name: start filebeat +- name: restart filebeat service: name: filebeat state: started diff --git a/roles/filebeat-cli/tasks/main.yml b/roles/filebeat-cli/tasks/main.yml index f9d8ff1..7330c1d 100644 --- a/roles/filebeat-cli/tasks/main.yml +++ b/roles/filebeat-cli/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Récupération de filebeat get_url: - url: http://s-adm.gsb.adm/gsbstore/filebeat-7.16.3-amd64.deb + url: http://s-adm.gsb.adm/gsbstore/filebeat-${BEATVAR}-amd64.deb dest: /tmp/ - name: Installation de filebeat apt: - deb: /tmp/filebeat-7.16.3-amd64.deb + deb: /tmp/filebeat-${BEATVEAR}-amd64.deb - name: Changement du fichier de conf copy: @@ -15,9 +15,9 @@ - name: Configuration de filebeat shell: filebeat modules enable system - notify: start filebeat + notify: restart filebeat - name: Lancement de la configuration de filebeat shell: filebeat setup -e - notify: start filebeat + notify: restart filebeat diff --git a/roles/metricbeat-cli/defaults/main.yml b/roles/metricbeat-cli/defaults/main.yml new file mode 100644 index 0000000..6d40b5c --- /dev/null +++ b/roles/metricbeat-cli/defaults/main.yml @@ -0,0 +1 @@ +BEATVER: "8.5.3" diff --git a/roles/metricbeat-cli/handlers/main.yml b/roles/metricbeat-cli/handlers/main.yml index ee365f2..51bb1b0 100644 --- a/roles/metricbeat-cli/handlers/main.yml +++ b/roles/metricbeat-cli/handlers/main.yml @@ -1,5 +1,5 @@ -- name: start metricbeat +- name: restart metricbeat service: name: metricbeat - state: started + state: restarted enabled: yes diff --git a/roles/metricbeat-cli/tasks/main.yml b/roles/metricbeat-cli/tasks/main.yml index be76be8..ee3cd30 100644 --- a/roles/metricbeat-cli/tasks/main.yml +++ b/roles/metricbeat-cli/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Récupération de metricbeat get_url: - url: http://s-adm.gsb.adm/gsbstore/metricbeat-7.16.3-amd64.deb + url: http://s-adm.gsb.adm/gsbstore/metricbeat-${BEATVER}-amd64.deb dest: /tmp/ - name: Installation de metricbeat apt: - deb: /tmp/metricbeat-7.16.3-amd64.deb + deb: /tmp/metricbeat-${BEATVER}-amd64.deb - name: Changement du fichier de conf copy: @@ -15,9 +15,9 @@ - name: Configuration de metricbeat shell: metricbeat modules enable system - notify: start metricbeat + notify: restart metricbeat - name: Lancement de la configuration de metricbeat shell: metricbeat setup -e - notify: start metricbeat + notify: restart metricbeat