Skip to content

Instantly share code, notes, and snippets.

@pgporada
Created March 1, 2017 16:00
Show Gist options
  • Save pgporada/eb0b19445f588d07dc1ab26ac3cbb951 to your computer and use it in GitHub Desktop.
Save pgporada/eb0b19445f588d07dc1ab26ac3cbb951 to your computer and use it in GitHub Desktop.
---
- name: Give 50% of all memory to the JVM
set_fact:
elasticsearch_java_initial_heap_size: "{{ (2|pow(((ansible_memtotal_mb|log(2))|round|int)) * 0.50)|int }}m"
elasticsearch_java_maximum_heap_size: "{{ (2|pow(((ansible_memtotal_mb|log(2))|round|int)) * 0.50)|int }}m"
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment