zammad: Setze empfohlene Konfiguration für opensearch

This commit is contained in:
phil 2023-02-01 12:29:44 +01:00
parent 84bc66fb08
commit 0b074b483c
2 changed files with 17 additions and 0 deletions

View file

@ -24,3 +24,8 @@
ansible.builtin.systemd:
name: zammad*
state: restarted
- name: restart opensearch
ansible.builtin.service:
name: opensearch
state: restarted

View file

@ -26,6 +26,18 @@
dest: /etc/opensearch/opensearch.yml
mode: 0644
- name: "Opensearch | Setze empfohlene Optionen"
ansible.builtin.replace:
path: /etc/opensearch/jvm.options
regexp: "{{ item.regexp }}"
replace: "{{ item.replace }}"
loop:
- regexp: '^-Xms[0-9]*g$'
replace: -Xms{{ (ansible_memtotal_mb / 1024 * 0.5) | round | int }}g
- regexp: '^-Xmx[0-9]*g$'
replace: -Xmx{{ (ansible_memtotal_mb / 1024 * 0.5) | round | int }}g
notify: restart opensearch
- name: "Opensearch | Starte Opensearch-Dienst"
ansible.builtin.systemd:
name: opensearch