From 4c84c7c10acac4c92a7c023f86457d1d90586176 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Sat, 30 Nov 2019 13:41:25 +0100 Subject: [PATCH] General improvements --- tasks/backup.yml | 4 ++++ tasks/install.yml | 12 ++++++++++++ tasks/main.yml | 2 ++ tasks/purge.yml | 1 + 4 files changed, 19 insertions(+) diff --git a/tasks/backup.yml b/tasks/backup.yml index 3fbf741..d2d1f71 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -11,12 +11,16 @@ force_basic_auth: yes status_code: 200 body_format: json + tags: + - Config - name: Copy snapshot script template: src: elasticsearch-snapshot dest: /usr/local/bin/elasticsearch-snapshot mode: 0755 + tags: + - Config - name: Backup Cron cron: diff --git a/tasks/install.yml b/tasks/install.yml index 9fdd872..8aa4871 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -27,6 +27,10 @@ owner: root group: elasticsearch mode: 0644 + tags: + - Config + notify: + - Restart Elasticsearch - name: Uninstall Plugins elasticsearch_plugin: @@ -63,6 +67,10 @@ line: 'xpack.security.transport.ssl.enabled: false' - regexp: 'path.repo' line: 'path.repo: ["/var/backups/elasticsearch"]' + tags: + - Config + notify: + - Restart Elasticsearch - name: Configure JVM options lineinfile: @@ -77,6 +85,10 @@ line: '-Xmx{{ elasticsearch.memory|default("2g") }}' - line: '-XX:+UseConcMarkSweepGC' state: absent + tags: + - Config + notify: + - Restart Elasticsearch - name: Prepare backup directory file: diff --git a/tasks/main.yml b/tasks/main.yml index 814db0b..d94370b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,6 +29,8 @@ - name: Include backup include_tasks: backup.yml + tags: + - Config when: elasticsearch.snapshot is defined and elasticsearch.snapshot.indices is defined when: not excluded_roles or "elasticsearch" not in excluded_roles diff --git a/tasks/purge.yml b/tasks/purge.yml index 8febe46..3f097bf 100644 --- a/tasks/purge.yml +++ b/tasks/purge.yml @@ -27,3 +27,4 @@ with_items: '{{ elasticsearch.purge }}' tags: - cron + - Config -- GitLab