Merge branch 'master' into gs/missing-become

This commit is contained in:
Garrick Staples 2020-01-28 14:24:55 -08:00 committed by GitHub
commit bd48a3567e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 43 deletions

View file

@ -10,7 +10,7 @@
#!/usr/local/bin/runbld #!/usr/local/bin/runbld
set -euo pipefail set -euo pipefail
export RBENV_VERSION='2.3.0' export RBENV_VERSION='2.5.7'
export PATH="$HOME/.rbenv/bin:$PATH" export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)" eval "$(rbenv init -)"
rbenv local $RBENV_VERSION rbenv local $RBENV_VERSION

View file

@ -23,7 +23,7 @@
#!/usr/local/bin/runbld #!/usr/local/bin/runbld
set -euo pipefail set -euo pipefail
export RBENV_VERSION='2.3.0' export RBENV_VERSION='2.5.7'
export PATH="$HOME/.rbenv/bin:$PATH" export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)" eval "$(rbenv init -)"
rbenv local $RBENV_VERSION rbenv local $RBENV_VERSION

View file

@ -1 +1 @@
2.3.0 2.5.7

View file

@ -1,5 +1,16 @@
# Changelog # Changelog
## 7.5.2 - 2020/01/21
* 7.5.2 as default version
| PR | Author | Title |
| ---------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------- |
|[#648](https://github.com/elastic/ansible-elasticsearch/pull/648) | [@jmlrt](https://github.com/jmlrt) | add proxy options to ES_JAVA_OPTS when defined with es_proxy_host|
|[#657](https://github.com/elastic/ansible-elasticsearch/pull/657) | [@jakommo](https://github.com/jakommo) | switched relative URLs to absolute URLs |
|[#664](https://github.com/elastic/ansible-elasticsearch/pull/664) | [@jmlrt](https://github.com/jmlrt) | bump ruby to 2.5.7 |
## 7.5.1 - 2019/12/18 ## 7.5.1 - 2019/12/18
* 7.5.1 as default version * 7.5.1 as default version

View file

@ -2,11 +2,11 @@ GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
bcrypt_pbkdf (1.0.1) bcrypt_pbkdf (1.0.1)
builder (3.2.3) builder (3.2.4)
ed25519 (1.2.4) ed25519 (1.2.4)
equatable (0.5.0) equatable (0.5.0)
erubis (2.7.0) erubi (1.9.0)
ffi (1.10.0) ffi (1.12.1)
gssapi (1.3.0) gssapi (1.3.0)
ffi (>= 1.0.1) ffi (>= 1.0.1)
gyoku (1.3.1) gyoku (1.3.1)
@ -32,7 +32,7 @@ GEM
thor thor
mixlib-shellout (2.4.4) mixlib-shellout (2.4.4)
mixlib-versioning (1.2.7) mixlib-versioning (1.2.7)
multi_json (1.13.1) multi_json (1.14.1)
necromancer (0.4.0) necromancer (0.4.0)
net-scp (2.0.0) net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0) net-ssh (>= 2.6.5, < 6.0.0)
@ -44,7 +44,7 @@ GEM
equatable (~> 0.5.0) equatable (~> 0.5.0)
tty-color (~> 0.4.0) tty-color (~> 0.4.0)
rubyntlm (0.6.2) rubyntlm (0.6.2)
rubyzip (1.2.2) rubyzip (2.0.0)
strings (0.1.5) strings (0.1.5)
strings-ansi (~> 0.1) strings-ansi (~> 0.1)
unicode-display_width (~> 1.5) unicode-display_width (~> 1.5)
@ -85,9 +85,9 @@ GEM
tty-screen (0.6.5) tty-screen (0.6.5)
unicode-display_width (1.6.0) unicode-display_width (1.6.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
winrm (2.3.2) winrm (2.3.4)
builder (>= 2.1.2) builder (>= 2.1.2)
erubis (~> 2.7) erubi (~> 1.8)
gssapi (~> 1.2) gssapi (~> 1.2)
gyoku (~> 1.0) gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2) httpclient (~> 2.2, >= 2.2.0.2)
@ -97,10 +97,10 @@ GEM
winrm-elevated (1.1.1) winrm-elevated (1.1.1)
winrm (~> 2.0) winrm (~> 2.0)
winrm-fs (~> 1.0) winrm-fs (~> 1.0)
winrm-fs (1.3.2) winrm-fs (1.3.4)
erubis (~> 2.7) erubi (~> 1.8)
logging (>= 1.6.1, < 3.0) logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1) rubyzip (~> 2.0)
winrm (~> 2.0) winrm (~> 2.0)
wisper (2.0.0) wisper (2.0.0)

View file

@ -19,19 +19,19 @@ The latest Elasticsearch versions of 7.x & 6.x are actively tested.
### Notice about multi-instance support ### Notice about multi-instance support
* If you use only one instance but want to upgrade from an older ansible-elasticsearch version, follow [upgrade procedure](./docs/multi-instance.md#upgrade-procedure) * If you use only one instance but want to upgrade from an older ansible-elasticsearch version, follow [upgrade procedure](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/multi-instance.md#upgrade-procedure)
* If you install more than one instance of Elasticsearch on the same host (with different ports, directory and config files), **do not update to ansible-elasticsearch >= 7.1.1**, please follow this [workaround](./docs/multi-instance.md#workaround) instead. * If you install more than one instance of Elasticsearch on the same host (with different ports, directory and config files), **do not update to ansible-elasticsearch >= 7.1.1**, please follow this [workaround](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/multi-instance.md#workaround) instead.
* For multi-instances use cases, we are now recommending Docker containers using our official images (https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html). * For multi-instances use cases, we are now recommending Docker containers using our official images (https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).
### Removing the MAX_THREAD settings ### Removing the MAX_THREAD settings
Ansible-elasticsearch 7.5.1 is removing the option to customize the maximum number of threads the process can start in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637/files#diff-04c6e90faac2675aa89e2176d2eec7d8L408). Ansible-elasticsearch 7.5.2 is removing the option to customize the maximum number of threads the process can start in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637/files#diff-04c6e90faac2675aa89e2176d2eec7d8L408).
We discovered that this option wasn't working anymore since multi-instance support removal in ansible-elasticsearch 7.1.1. We discovered that this option wasn't working anymore since multi-instance support removal in ansible-elasticsearch 7.1.1.
This option will be added back in a following release if it's still relevant regarding latest Elasticsearch evolutions. This option will be added back in a following release if it's still relevant regarding latest Elasticsearch evolutions.
### Changes about configuration files ### Changes about configuration files
Ansible-elasticsearch 7.5.1 is updating the configuration files provided by this role in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637) which contained some otions deprecated in 6.x and 7.x: Ansible-elasticsearch 7.5.2 is updating the configuration files provided by this role in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637) which contained some otions deprecated in 6.x and 7.x:
- `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch`: the new template reflect the configuration file provided by Elasticsearch >= 6.x, the parameter we removed were already not used in 6.x and 7.x - `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch`: the new template reflect the configuration file provided by Elasticsearch >= 6.x, the parameter we removed were already not used in 6.x and 7.x
- `/etc/elasticsearch/jvm.options`: the new template reflect the configuration files provided by Elasticsearch >= 6.x - `/etc/elasticsearch/jvm.options`: the new template reflect the configuration files provided by Elasticsearch >= 6.x
- `/etc/elasticsearch/log4j2.properties`: - `/etc/elasticsearch/log4j2.properties`:
@ -55,7 +55,7 @@ This role uses the json_query filter which [requires jmespath](https://github.co
Create your Ansible playbook with your own tasks, and include the role elasticsearch. You will have to have this repository accessible within the context of playbook. Create your Ansible playbook with your own tasks, and include the role elasticsearch. You will have to have this repository accessible within the context of playbook.
```sh ```sh
ansible-galaxy install elastic.elasticsearch,7.5.1 ansible-galaxy install elastic.elasticsearch,7.5.2
``` ```
Then create your playbook yaml adding the role elasticsearch. Then create your playbook yaml adding the role elasticsearch.
@ -69,14 +69,14 @@ The simplest configuration therefore consists of:
roles: roles:
- role: elastic.elasticsearch - role: elastic.elasticsearch
vars: vars:
es_version: 7.5.1 es_version: 7.5.2
``` ```
The above installs Elasticsearch 7.5.1 in a single node 'node1' on the hosts 'localhost'. The above installs Elasticsearch 7.5.2 in a single node 'node1' on the hosts 'localhost'.
**Note**: **Note**:
Elasticsearch default version is described in [`es_version`](defaults/main.yml#L2). You can override this variable in your playbook to install another version. Elasticsearch default version is described in [`es_version`](https://github.com/elastic/ansible-elasticsearch/blob/master/defaults/main.yml#L2). You can override this variable in your playbook to install another version.
While we are testing this role only with one 7.x and one 6.x version (respectively [7.5.1](defaults/main.yml#L2) and [6.8.6](.kitchen.yml#L22) at the time of writing), this role should work with others version also in most cases. While we are testing this role only with one 7.x and one 6.x version (respectively [7.5.2](https://github.com/elastic/ansible-elasticsearch/blob/master/defaults/main.yml#L2) and [6.8.6](https://github.com/elastic/ansible-elasticsearch/blob/master/.kitchen.yml#L22) at the time of writing), this role should work with others version also in most cases.
This role also uses [Ansible tags](http://docs.ansible.com/ansible/playbooks_tags.html). Run your playbook with the `--list-tasks` flag for more information. This role also uses [Ansible tags](http://docs.ansible.com/ansible/playbooks_tags.html). Run your playbook with the `--list-tasks` flag for more information.
@ -212,8 +212,6 @@ A more complex example:
es_api_port: 9201 es_api_port: 9201
es_plugins: es_plugins:
- plugin: ingest-attachment - plugin: ingest-attachment
proxy_host: proxy.example.com
proxy_port: 8080
``` ```
#### Important Note #### Important Note
@ -395,7 +393,7 @@ These can either be set to a user declared in the file based realm, with admin p
#### X-Pack Security SSL/TLS #### X-Pack Security SSL/TLS
* To configure your cluster with SSL/TLS for HTTP and/or transport communications follow the [SSL/TLS setup procedure](./docs/ssl-tls-setup.md) * To configure your cluster with SSL/TLS for HTTP and/or transport communications follow the [SSL/TLS setup procedure](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/ssl-tls-setup.md)
### Additional Configuration ### Additional Configuration
@ -404,7 +402,7 @@ In addition to es_config, the following parameters allow the customization of th
* ```es_enable_xpack``` Default `true`. Setting this to `false` will install the oss release of elasticsearch * ```es_enable_xpack``` Default `true`. Setting this to `false` will install the oss release of elasticsearch
* `es_xpack_trial` Default `false`. Setting this to `true` will start the 30-day trail once the cluster starts. * `es_xpack_trial` Default `false`. Setting this to `true` will start the 30-day trail once the cluster starts.
* ```es_version``` (e.g. "7.5.1"). * ```es_version``` (e.g. "7.5.2").
* ```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost". * ```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost".
* ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200. **CHANGE IF THE HTTP PORT IS NOT 9200** * ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200. **CHANGE IF THE HTTP PORT IS NOT 9200**
* ```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin. * ```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin.
@ -461,7 +459,7 @@ Both ```es_user_id``` and ```es_group_id``` must be set for the user and group i
* ```es_restart_on_change``` - defaults to true. If false, changes will not result in Elasticsearch being restarted. * ```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. * ```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.
This role ships with sample templates located in the [test/integration/files/templates-7.x](test/integration/files/templates-7.x) directory. `es_templates_fileglob` variable is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path. This role ships with sample templates located in the [test/integration/files/templates-7.x](https://github.com/elastic/ansible-elasticsearch/tree/master/test/integration/files/templates-7.x) directory. `es_templates_fileglob` variable is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path.
### Proxy ### Proxy
@ -470,17 +468,6 @@ To define proxy globally, set the following variables:
* ```es_proxy_host``` - global proxy host * ```es_proxy_host``` - global proxy host
* ```es_proxy_port``` - global proxy port * ```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 ## 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. * 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.

View file

@ -1,5 +1,5 @@
--- ---
es_version: "7.5.1" es_version: "7.5.2"
es_use_snapshot_release: false es_use_snapshot_release: false
es_enable_xpack: true es_enable_xpack: true
es_package_name: "elasticsearch" es_package_name: "elasticsearch"

View file

@ -15,12 +15,12 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..'))
old_versions = { old_versions = {
6: '6.8.5', 6: '6.8.5',
7: '7.5.0', 7: '7.5.1',
} }
new_versions = { new_versions = {
6: '6.8.6', 6: '6.8.6',
7: '7.5.1', 7: '7.5.2',
} }
files = [ files = [

View file

@ -75,7 +75,6 @@
CONF_DIR: "{{ es_conf_dir }}" CONF_DIR: "{{ es_conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}" ES_PATH_CONF: "{{ es_conf_dir }}"
ES_INCLUDE: "{{ default_file }}" 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 until: plugin_installed.rc == 0
retries: 5 retries: 5
delay: 5 delay: 5

View file

@ -15,7 +15,7 @@ ES_PATH_CONF={{ es_conf_dir }}
PID_DIR={{ es_pid_dir }} PID_DIR={{ es_pid_dir }}
# Additional Java OPTS # 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) # Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true #RESTART_ON_UPGRADE=true