From fedccafb67e615c84c6eb2157f619344c2c23e59 Mon Sep 17 00:00:00 2001 From: Dale McDiarmid Date: Tue, 17 Jan 2017 10:50:19 +0000 Subject: [PATCH] remove work dir for 5.x --- README.md | 5 ++--- defaults/main.yml | 2 -- tasks/elasticsearch-config.yml | 1 - tasks/elasticsearch-parameters.yml | 1 - templates/elasticsearch.j2 | 5 ----- templates/elasticsearch.yml.j2 | 4 ---- test/integration/config.yml | 2 +- 7 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 67a6284..da0ceaa 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The following illustrates applying configuration parameters to an Elasticsearch hosts: localhost roles: #expand to all available parameters - - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", + - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs", es_config: { node.name: "node1", cluster.name: "custom-cluster", @@ -95,7 +95,7 @@ A more complex example: hosts: localhost roles: #expand to all available parameters - - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", + - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs", es_config: { node.name: "node1", cluster.name: "custom-cluster", @@ -351,7 +351,6 @@ controlled by the following parameters: * ```es_pid_dir``` - defaults to "/var/run/elasticsearch". * ```es_data_dirs``` - defaults to "/var/lib/elasticsearch". This can be a list or comma separated string e.g. ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"] or "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2" * ```es_log_dir``` - defaults to "/var/log/elasticsearch". -* ```es_work_dir``` - defaults to "/tmp/elasticsearch". * ```es_restart_on_change``` - defaults to true. If false, changes will not result in Elasticsearch being restarted. * ```es_plugins_reinstall``` - defaults to false. If true, all currently installed plugins will be removed from a node. Listed plugins will then be re-installed. diff --git a/defaults/main.yml b/defaults/main.yml index 178e84f..6f09b9f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,7 +20,6 @@ es_config: {} es_pid_dir: "/var/run/elasticsearch" es_data_dirs: "/var/lib/elasticsearch" es_log_dir: "/var/log/elasticsearch" -es_work_dir: "/tmp/elasticsearch" es_max_open_files: 65536 es_allow_downgrades: false es_enable_xpack: false @@ -34,6 +33,5 @@ es_api_port: 9200 # to allow the role to be conditionally played with a when condition. pid_dir: '' log_dir: '' -work_dir: '' conf_dir: '' data_dirs: '' diff --git a/tasks/elasticsearch-config.yml b/tasks/elasticsearch-config.yml index 98d80ea..9eeb5d2 100644 --- a/tasks/elasticsearch-config.yml +++ b/tasks/elasticsearch-config.yml @@ -6,7 +6,6 @@ file: path={{ item }} state=directory owner={{ es_user }} group={{ es_group }} with_items: - "{{pid_dir}}" - - "{{work_dir}}" - "{{log_dir}}" - "{{conf_dir}}" diff --git a/tasks/elasticsearch-parameters.yml b/tasks/elasticsearch-parameters.yml index 502403d..9a7cae3 100644 --- a/tasks/elasticsearch-parameters.yml +++ b/tasks/elasticsearch-parameters.yml @@ -46,5 +46,4 @@ - set_fact: instance_suffix={{inventory_hostname}}-{{ es_instance_name }} - set_fact: pid_dir={{ es_pid_dir }}/{{instance_suffix}} - set_fact: log_dir={{ es_log_dir }}/{{instance_suffix}} -- set_fact: work_dir={{ es_work_dir }}/{{instance_suffix}} - set_fact: data_dirs={{ es_data_dirs | append_to_list('/'+instance_suffix) }} diff --git a/templates/elasticsearch.j2 b/templates/elasticsearch.j2 index 0acf7ef..0305e4e 100644 --- a/templates/elasticsearch.j2 +++ b/templates/elasticsearch.j2 @@ -14,11 +14,6 @@ DATA_DIR={{ data_dirs | array_to_str }} # Elasticsearch logs directory LOG_DIR={{log_dir}} -{% if es_version | version_compare('5.0', '<') %} -# Elasticsearch work directory -WORK_DIR={{work_dir}} -{% endif %} - # Elasticsearch PID directory PID_DIR={{pid_dir}} diff --git a/templates/elasticsearch.yml.j2 b/templates/elasticsearch.yml.j2 index 2bbc5c2..c0cc584 100644 --- a/templates/elasticsearch.yml.j2 +++ b/templates/elasticsearch.yml.j2 @@ -18,10 +18,6 @@ path.conf: {{ conf_dir }} path.data: {{ data_dirs | array_to_str }} -{% if es_version | version_compare('5.0', '<') %} -path.work: {{ work_dir }} -{% endif %} - path.logs: {{ log_dir }} {% if not "security" in es_xpack_features %} diff --git a/test/integration/config.yml b/test/integration/config.yml index 9a28b0e..2a05ebe 100644 --- a/test/integration/config.yml +++ b/test/integration/config.yml @@ -4,7 +4,7 @@ hosts: localhost roles: #expand to all available parameters - - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_work_dir: "/opt/elasticsearch/temp", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.memory_lock: true } } + - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: ["/opt/elasticsearch/data-1","/opt/elasticsearch/data-2"], es_log_dir: "/opt/elasticsearch/logs", es_user_id: 333, es_group_id: 333, es_config: {node.name: "node1", cluster.name: "custom-cluster", discovery.zen.ping.unicast.hosts: "localhost:9301", http.port: 9201, transport.tcp.port: 9301, node.data: false, node.master: true, bootstrap.memory_lock: true } } vars: es_scripts: false es_templates: false