diff --git a/defaults/main.yml b/defaults/main.yml index 9e718e9..a912892 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -17,4 +17,6 @@ es_pid_dir: "/var/run/elasticsearch" es_data_dirs: "/var/lib/elasticsearch" es_log_dir: "/var/log/elasticsearch" es_work_dir: "/tmp/elasticsearch" -es_plugin_dir: "/usr/share/elasticsearch/plugins" \ No newline at end of file +es_plugin_dir: "/usr/share/elasticsearch/plugins" +es_max_open_files: 65535 + diff --git a/templates/systemd/elasticsearch.j2 b/templates/systemd/elasticsearch.j2 index 8d400de..ab75b44 100644 --- a/templates/systemd/elasticsearch.j2 +++ b/templates/systemd/elasticsearch.j2 @@ -31,7 +31,7 @@ StandardOutput=null StandardError=journal # Specifies the maximum file descriptor number that can be opened by this process -LimitNOFILE=65535 +LimitNOFILE={{es_max_open_files}} # Specifies the maximum number of bytes of memory that may be locked into RAM # Set to "infinity" if you use the 'bootstrap.mlockall: true' option @@ -53,4 +53,4 @@ SendSIGKILL=no SuccessExitStatus=143 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target