Add support for apt package pinning

Adds variables to pin elastic package versions to ensure they
can't move out of sequence. An individual variable is added
for journalbeat given it is withdrawn from 7.16.

Includes a version bump to a more recent 7.x release which is
still compatible with this role

Change-Id: I5e6c42398acf70012bf879f41953d409abbd89f4
This commit is contained in:
Andrew Bonney 2022-01-14 13:58:34 +00:00
parent 1480703942
commit 29080ab4f6
4 changed files with 37 additions and 3 deletions

View File

@ -11,3 +11,7 @@
scm: git
src: https://opendev.org/openstack/ansible-config_template
version: master
- name: apt_package_pinning
scm: git
src: https://opendev.org/openstack/openstack-ansible-apt_package_pinning
version: master

View File

@ -1,4 +1,4 @@
beat_version: "7.3.2"
beat_version: "7.15.2"
default_ilm_rollover_max_size: "30G"
default_ilm_rollover_max_age: "15d"
default_ilm_delete_min_age: "30d"

View File

@ -30,4 +30,5 @@ galaxy_info:
- development
- elasticsearch
- elastic-stack
dependencies: []
dependencies:
- role: apt_package_pinning

View File

@ -412,7 +412,7 @@ elastic_beats:
skydive:
hosts: "{{ (((groups['skydive_analyzers'] | default([])) | length) > 0) | ternary((groups['hosts'] | default([])), []) }}"
beat_version: "7.3.2"
beat_version: "7.15.2"
default_ilm_rollover_max_size: "30G"
default_ilm_rollover_max_age: "15d"
default_ilm_delete_min_age: "30d"
@ -430,3 +430,32 @@ default_ilm_policy:
delete: {}
default_ilm_policy_filename: "default-ilm-policy.json"
default_ilm_policy_file_location: "/tmp"
# elastic_apt_pin_file_name: "elasticsearch.pref"
# elastic_apt_pin_version: "{{ beat_version }}"
# elastic_apt_pin_packages: []
_elastic_apt_pin_packages:
- version: "{{ elastic_apt_pin_version_journalbeat | default(elastic_apt_pin_version | default(beat_version)) }}"
package: "journalbeat"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "packetbeat"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "apm-server"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "metricbeat"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "auditbeat"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "filebeat"
- version: "1:{{ elastic_apt_pin_version | default(beat_version) }}-1"
package: "logstash"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "elasticsearch"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "kibana"
- version: "{{ elastic_apt_pin_version | default(beat_version) }}"
package: "heartbeat-elastic"
apt_package_pinning_file_name: "{{ elastic_apt_pin_file_name | default('elasticsearch.pref') }}"
apt_pinned_packages: "{{ elastic_apt_pin_packages | default(_elastic_apt_pin_packages) }}"