From 8ad002793617872deb4ac3cec1764238272a951d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 20 Jan 2021 20:35:33 +0100 Subject: [PATCH] log-store: add 2GB swap files to hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/group_vars/log-store.yml | 4 ++++ ansible/logs.yml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/log-store.yml b/ansible/group_vars/log-store.yml index e15edf7..17f406c 100644 --- a/ansible/group_vars/log-store.yml +++ b/ansible/group_vars/log-store.yml @@ -2,6 +2,10 @@ # Mount extra volume for ElasticSearch container bootstrap__extra_volume_path: '/docker' +# Syncing can use a lot of mamory +swap_file_path: '/main.swap' +swap_file_size_mb: 2048 + # ElasticSearch Cluster es_master_nodes: | {{ ansible_play_hosts diff --git a/ansible/logs.yml b/ansible/logs.yml index c62243c..86bc181 100644 --- a/ansible/logs.yml +++ b/ansible/logs.yml @@ -2,6 +2,8 @@ - name: Configure ElasticSearch servers hosts: log-store roles: + - role: swap-file + tags: swap-file - role: origin-certs tags: origin-certs - role: elasticsearch @@ -17,7 +19,6 @@ - name: Configure ElasticSearch servers hosts: log-dash - roles: pre_tasks: - name: Fetch available elasticsearch nodes uri: