diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fb8fe4..9ef05df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/) ### Added +- feat: add variable to set major version - feat: add ilm policy - test: add support debian 12 diff --git a/README.md b/README.md index 5c3b339..e53638b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Install and configure Elasticsearch ## Role variables +* `elasticsearch_major_version` - set the major version (default: `7`) * `elasticsearch_heap_size` - set the heap size (default: `1g`) * `elasticsearch_config` - hash with the configuration (see [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html)) diff --git a/defaults/main.yml b/defaults/main.yml index a9572c3..deb7bec 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,5 @@ --- +elasticsearch_major_version: 7 elasticsearch_heap_size: 1g elasticsearch_config: {} elasticsearch_default_config: diff --git a/tasks/packages.yml b/tasks/packages.yml index 829fc9d..1eb78b6 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -13,7 +13,7 @@ - name: Add repository ansible.builtin.apt_repository: - repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main + repo: "deb https://artifacts.elastic.co/packages/{{ elasticsearch_major_version }}.x/apt stable main" tags: elasticsearch - name: Install package