Closed ageis closed 8 years ago
See #9 for context.
Changes look good! Will test locally and report back.
Refactored the var logic a bit. Odd numbers of GB for RAM weren't assigning to 50% correctly, so switched to using MB instead, which helps. Also implemented a sanity check on the upper bound of 31GB, per the ElasticSearch docs.
Reran the tests with a variety of RAM values and it's looking pretty good—let's hold off on merge until we have a serverspec test to track this new task.
OK, added a corresponding test—let me rerun the build with various RAM amounts again and I'll report back.
Happy with the task and tests, merging.
Not bad. It breaks with low amounts of RAM though—for instance, if the host has 512MB, the output resolves to
0g
. Half a gig of RAM is too little to run an ELK stack realistically, but the config should still sanity check the values. How about a two-pass approach:set_fact
to store the numeric value of the intended heapsizeIn addition, the task updating the defaults file should notify the handler to restart the elasticsearch service.