elasticsearch/cookbook-elasticsearch — pull request #117 by ctrabold (2013-07-30 05:48:28+00:00)
Title: Set ES file descriptors via file in `limits.d`

This replaces the `bash` fu with an easier to read `file` resource (following the recommendations found [here](http://asquera.de/opensource/2012/11/25/elasticsearch-pre-flight-checklist/#file-descriptors).

As Chef handles the idempotency we can drop the custom (and hard to read) `not_if` magic.

The result is the following file:

# cat /etc/security/limits.d/10-elasticsearch.conf
elasticsearch - nofile 4000
elasticsearch - memlock unlimited

Tested on Vagrant with Debian 6 by removing the two lines from `/etc/security/limits.conf` and restarting the machine. Calling `ulimit -Hn` showed the expected value.