Merge pull request #648 from jmlrt/fix-es_java_opts-646
add proxy options to ES_JAVA_OPTS when defined with es_proxy_host
This commit is contained in:
commit
50321df03d
3 changed files with 1 additions and 15 deletions
13
README.md
13
README.md
|
|
@ -212,8 +212,6 @@ A more complex example:
|
|||
es_api_port: 9201
|
||||
es_plugins:
|
||||
- plugin: ingest-attachment
|
||||
proxy_host: proxy.example.com
|
||||
proxy_port: 8080
|
||||
```
|
||||
|
||||
#### Important Note
|
||||
|
|
@ -470,17 +468,6 @@ To define proxy globally, set the following variables:
|
|||
* ```es_proxy_host``` - global proxy host
|
||||
* ```es_proxy_port``` - global proxy port
|
||||
|
||||
To define proxy only for a particular plugin during its installation:
|
||||
|
||||
```yaml
|
||||
es_plugins:
|
||||
- plugin: ingest-attachment
|
||||
proxy_host: proxy.example.com
|
||||
proxy_port: 8080
|
||||
```
|
||||
|
||||
> For plugins installation, proxy_host and proxy_port are used first if they are defined and fallback to the global proxy settings if not. The same values are currently used for both the http and https proxy settings.
|
||||
|
||||
## Notes
|
||||
|
||||
* The role assumes the user/group exists on the server. The elasticsearch packages create the default elasticsearch user. If this needs to be changed, ensure the user exists.
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@
|
|||
CONF_DIR: "{{ es_conf_dir }}"
|
||||
ES_PATH_CONF: "{{ es_conf_dir }}"
|
||||
ES_INCLUDE: "{{ default_file }}"
|
||||
ES_JAVA_OPTS: "{% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -Dhttp.proxyHost={{ item.proxy_host }} -Dhttp.proxyPort={{ item.proxy_port }} -Dhttps.proxyHost={{ item.proxy_host }} -Dhttps.proxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -Dhttp.proxyHost={{ es_proxy_host }} -Dhttp.proxyPort={{ es_proxy_port }} -Dhttps.proxyHost={{ es_proxy_host }} -Dhttps.proxyPort={{ es_proxy_port }} {% endif %}"
|
||||
until: plugin_installed.rc == 0
|
||||
retries: 5
|
||||
delay: 5
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ ES_PATH_CONF={{ es_conf_dir }}
|
|||
PID_DIR={{ es_pid_dir }}
|
||||
|
||||
# Additional Java OPTS
|
||||
ES_JAVA_OPTS=
|
||||
ES_JAVA_OPTS="{% if es_proxy_host is defined and es_proxy_host != '' %}-Dhttp.proxyHost={{ es_proxy_host }} -Dhttp.proxyPort={{ es_proxy_port }} -Dhttps.proxyHost={{ es_proxy_host }} -Dhttps.proxyPort={{ es_proxy_port }}{% endif %}"
|
||||
|
||||
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
|
||||
#RESTART_ON_UPGRADE=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue