From 220c6ae65639da81f9c8248ddb74ed4550251564 Mon Sep 17 00:00:00 2001 From: Kirk K Date: Thu, 28 Oct 2021 12:32:29 -0500 Subject: [PATCH] Pin Elastic Stack Versions (#587) Use version tag in config to pin installed software --- roles/elasticsearch/tasks/before.yml | 3 +-- roles/filebeat/tasks/main.yml | 2 +- roles/kibana/tasks/main.yml | 2 +- roles/logstash/tasks/main.yml | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/roles/elasticsearch/tasks/before.yml b/roles/elasticsearch/tasks/before.yml index 74f7194b..8738df37 100644 --- a/roles/elasticsearch/tasks/before.yml +++ b/roles/elasticsearch/tasks/before.yml @@ -3,8 +3,7 @@ - name: Install packages yum: name: - - java-11-openjdk-headless - - elasticsearch + - elasticsearch-{{ rock_services | selectattr('name', 'equalto', 'elasticsearch') | map(attribute='version') | first }} state: installed register: es_install diff --git a/roles/filebeat/tasks/main.yml b/roles/filebeat/tasks/main.yml index 8d672047..b7b4f089 100644 --- a/roles/filebeat/tasks/main.yml +++ b/roles/filebeat/tasks/main.yml @@ -2,7 +2,7 @@ - name: Install filebeat package yum: - name: filebeat + name: filebeat-{{ rock_services | selectattr('name', 'equalto', 'filebeat') | map(attribute='version') | first }} state: present - name: Create filebeat config directory diff --git a/roles/kibana/tasks/main.yml b/roles/kibana/tasks/main.yml index 5a2bf43a..4392152d 100644 --- a/roles/kibana/tasks/main.yml +++ b/roles/kibana/tasks/main.yml @@ -2,7 +2,7 @@ - name: Install packages yum: - name: kibana + name: kibana-{{ rock_services | selectattr('name', 'equalto', 'kibana') | map(attribute='version') | first }} state: present - name: Update kibana config diff --git a/roles/logstash/tasks/main.yml b/roles/logstash/tasks/main.yml index 482189a3..a5896867 100644 --- a/roles/logstash/tasks/main.yml +++ b/roles/logstash/tasks/main.yml @@ -3,8 +3,7 @@ - name: Install packages yum: name: - - java-11-openjdk-headless - - logstash + - logstash-{{ rock_services | selectattr('name', 'equalto', 'logstash') | map(attribute='version') | first }} state: present - name: Add sysconfig file