Commit graph

111 commits

Author SHA1 Message Date
Wade Rossmann
50bf641b8c
Properly quote password in shell command (#715) 2020-08-26 08:42:43 +02:00
Andris Strazdiņš
f339345a0b
Update elasticsearch-security-file.yml (#705)
Without become option stat operation for old users file will work only if user is in elasticsearch group, but copying of old file will fail because user have no write access in elasticsearch config dir.
2020-07-16 16:42:41 +02:00
Julien Mailleret
cab03ece10
xpack features refactoring (#653)
- rename es_enable_xpack variable to oss_version
  this variable name should be more explicit and consistent with the xpack changes made in 6.3
  es_enable_xpack can still be used but is deprecated and will be removed in a later version.
- remove es_xpack-features variables
  this variable was not working anymore since 6.3 [0]

[0]: https://github.com/elastic/ansible-elasticsearch/issues/608
2020-06-12 18:15:03 +02:00
Duy Nguyen
96055923f3
Update elasticsearch-security-file.yml
Refactor template tasks
2020-03-06 15:19:09 +08:00
Duy Nguyen
c4e00fdc5f
Update elasticsearch-security.yml
Refactor template task for copying roles files
2020-03-06 15:15:28 +08:00
Duy Nguyen
9193660334
Update tasks/xpack/elasticsearch-xpack.yml
Co-Authored-By: Julien Mailleret <julien.mailleret@elastic.co>
2020-03-04 22:01:00 +08:00
Duy Nguyen
b1acff4820
Update tasks/xpack/elasticsearch-xpack.yml
Co-Authored-By: Julien Mailleret <julien.mailleret@elastic.co>
2020-03-04 22:00:50 +08:00
Duy Nguyen
444d9f473b
Update elasticsearch-xpack.yml
Refactor file module and fix file mode syntax to support octal number format
2020-03-04 14:56:35 +08:00
pemontto
70143c6327
Add es_license_api variable 2019-10-31 10:54:53 +00:00
pemontto
a2c4012197
Update and document unmanaged user vars 2019-10-28 14:25:52 +00:00
pemontto
b59262cb34
Fix deprecated license URL 2019-10-18 18:27:55 +01:00
pemontto
57fa4e5176
Add option to enable xpack trial 2019-10-18 16:54:46 +01:00
pemontto
2b0343e135
URL encode items in path 2019-10-16 16:36:17 +01:00
pemontto
27e3cff9a2
Add option to keep existing users 2019-10-15 15:37:39 +01:00
Nathan Young
d0064c6a88
Add option for invalid certificates 2019-10-12 00:03:47 +01:00
Nathan Young
551d93b646
Merge branch 'master' into AddSSLSupport 2019-10-11 23:09:03 +01:00
Nathan Young
5da76a85c7
Add api scheme based on http_ssl variable 2019-10-11 17:16:35 +01:00
Nathan Young
2fb648fee6
Fix deprecated security api endpoint 2019-10-11 17:02:15 +01:00
Julien Mailleret
1befe6c0d9
stop trying to create users file as it's already created by the official package 2019-09-18 10:57:58 +02:00
Julien Mailleret
9bac169862
use files permissions from official package 2019-09-18 10:57:07 +02:00
Julien Mailleret
6a1b886753
use default permissions from official package for plugin directory 2019-09-18 10:53:43 +02:00
Julien Mailleret
c8b666bd79
remove /etc/elasticsearch/security directory creation
This directory isn't used anywhere in this ansible-role
2019-09-18 09:51:45 +02:00
Julien Mailleret
08a8a467b6
fix missing permissions 2019-09-16 12:31:07 +02:00
Julien Mailleret
8e1cafacf5
add some comment to better identify user migration tasks from elasticsearch < 6.3 2019-09-16 10:46:43 +02:00
Julien Mailleret
e45c902e5e
clean unused task related to multi-instance directories 2019-09-16 10:46:43 +02:00
Julien Mailleret
407dddcae1
hardcode elasticsearch-users command instead of es_xpack_users_command
This variable was introduce to match legacy x-pack/users command before 6.3.
2019-09-16 10:46:43 +02:00
Julien Mailleret
08512fc17e
fix typo
I think this typo was here since https://github.com/elastic/ansible-elasticsearch/pull/129/commits/048fd636025a00379d2549c36f8b4bd271a8f832
2019-09-16 10:46:37 +02:00
Julien Mailleret
27a524cd07
remove x-pack dir creation 2019-09-16 10:43:32 +02:00
Julien Mailleret
0f601259c6
clean es_xpack_conf_subdir variable
This variable was added to manage specific x-pack dir with version < 6.3
2019-09-16 10:43:32 +02:00
Julien Mailleret
abaf124639
cleanup unused es_version_changed fact 2019-09-16 10:43:32 +02:00
Julien Mailleret
d5e414b9aa
clean code related to xpack plugin install
We don't need this anymore as X-Pack is now already included in elasticsearch since 6.3.
2019-09-16 10:43:32 +02:00
Michael Russell
582c79c607
Add back in force_basic_auth for all http requests
Related: #576
This is needed when using security for 6.x. All other http requests
still have this parameter added.
2019-07-09 21:26:10 +02:00
Julien Mailleret
5b1d028bd2
fix ''dict object has no attribute dict_keys" issue with python3 (#578)
In Python2, the dict.keys(), dict.values(), and dict.items() methods returns a list. Jinja2 returns that to Ansible via a string representation that Ansible can turn back into a list. In Python3, those methods return a dictionary view object.
resource: https://docs.ansible.com/ansible/2.4/playbooks_python_version.html#dictionary-views
2019-06-07 15:54:10 +02:00
Julien Mailleret
2cb020a4c2
Remove multi instances support (#566)
* remove multi instances support
The goal is to stop supporting installation of more than one node in the same host. This commit update the Ansible role README documentation and remove the multi instances kitchen test.

* remove systemd and init.d templates
As we no more need to support more than one node on the same host, we no more need to override init files provided by elasticsearch official packages.

* remove file script feature
File scripts have been removed since elasticsearch 6.0 (https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_scripting_changes.html#_file_scripts_removed)

* remove custom user and custom group
ES_USER and ES_GROUP settings are no longer supported (https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_packaging_changes.html#_configuring_custom_user_and_group_for_package_is_no_longer_allowed)

* add upgrade procedure

* use same task for license activation with and without authentication
2019-06-03 14:18:09 +02:00
Julien Mailleret
a879b74def
[xpack] use elasticsearch default xpack features (#560)
- Stop forcing es_xpack_features variable in order to let elasticsearch install default features described in http://localhost:9200/_xpack
- Change xpack test scope to be able to test default xpack install
  - xpack scenario will test xpack install with default features
  - xpack upgrade scenario will fully test security feature
  - oss-to-xpack-upgrade will test installing only other specific features
- Cleanup some duplicate serverspec tests
- Remove `system_key`feature (deprecated in 5.6 and removed in 6.0 - [Breaking Changes 6.0.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking-6.0.0-xes.html))
- Cleanup some ansible code (especially in `when` conditions)
2019-05-29 12:10:11 +02:00
Grzegorz Nowak
785ce1cd26 add a few more 'check_mode:no' props for compatiblity with --check mode of ansible 2019-03-14 09:24:06 +01:00
Michel Weitbrecht
a10676384f Refactor deprecated filter calls
Previously, each of the calls generated a warning : "Using tests as
filters is deprecated. Instead of using `result|version_compare` use
`result is version_compare`. This feature will be removed in version
2.9.".
2018-12-28 15:36:33 +01:00
Michael Russell
ec3465a60c
Only attempt to copy the old users file if it actually exists 2018-11-27 12:50:49 +01:00
Michael Russell
f221381929
Copy the old deprecated users file when upgrading
In 6.5 Elasticsearch finds the old file which breaks the way the ansible
playbook is detecting the installed users. This means that after an
upgrade to 6.5 the users still actually exist but the playbook fails
when trying to add them again as they already exist.
2018-11-26 13:56:51 +01:00
Bill Schwanitz
cc6b4e78e2 add missing become: yes 2018-06-26 15:28:01 -04:00
Michael Russell
dce98bbd34
Revert no_log debugging 2018-06-14 16:37:31 +02:00
Michael Russell
77d47e3235
Don't use the 'x-pack' subdir now that x-pack is part of core 2018-06-14 16:33:40 +02:00
Michael Russell
bbc5e0603d
Abstract 6.3 changes into a separate task to reduce all of the jinja one
liner complexity

Set ES_PATH_CONF when installing so upgrading from 6.2 to 6.3 works as
expected
2018-06-14 14:44:31 +02:00
Michael Russell
e5809a3169
Create the keystore if it doesn't already exist 2018-06-13 17:33:23 +02:00
Michael Russell
6d82cf3142
WIP: 6.3 support 2018-06-13 08:29:45 +02:00
Jeffrey Everling
796731721c Removing ssl configuration 2018-05-05 08:00:38 +02:00
Jeffrey Everling
ba080bc3c8 Revert "SSL support optimisation"
This reverts commit 80baf268e5.
2018-05-05 07:56:16 +02:00
Jeffrey Everling
80baf268e5 SSL support optimisation 2018-05-05 07:42:08 +02:00
Jeffrey Everling
cc28b6149a Added more x-pack config options 2018-05-03 16:45:04 +02:00
Jeffrey Everling
34f08130e1 Added changes to add required functionality and fix a bug 2018-04-24 12:51:03 +02:00