Skip to content

Commit fcf6d4e

Browse files
authored
Pin version of Python elasticsearch client (#391)
There seems to be no version of the Python `elasticsearch` client that is compatible to all versions. It's either version 9 or below 9. So for now we pin the version of the client to one that is compatible to versions below 9. We need to take care of that when supporting Elastic Stack 9.
1 parent a0f47b9 commit fcf6d4e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ You will need the following Ansible collections installed
5050
You will need these packages / libraries installed. Some very basic packages like `openssl` get handled by the collection if needed. The following list contains packages and libraries which only apply to special cases or need for you to decide on the installation method.
5151

5252
* `passlib` Python library if you do not disable password hashing for logstash user and you want to use logstash role from this collection. It should be installed with pip on the Ansible controller.
53+
* `elasticsearch` Python module. Current versions are either compatible to Elasticsearch 9 or versions lower than 9. There seems to be no version that can serve both. So for now we install a version of the client lower than 9 but need to take care to install the right one when we make this collection compatible to Elastic Stack 9
5354

5455
You may want the following Ansible roles installed. There other ways to achieve what they are doing but using them is easy and convenient.
5556

requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ molecule
44
molecule-plugins[docker]
55
pytest
66
passlib
7-
elasticsearch
7+
elasticsearch<9

roles/elasticstack/tasks/packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- name: Install Python Modules via pip
4646
ansible.builtin.pip:
4747
name:
48-
- elasticsearch
48+
- 'elasticsearch<9'
4949
- cryptography
5050
ignore_errors: true
5151
register: elasticstack_pip_installation
@@ -61,7 +61,7 @@
6161
- name: Install Python Modules via pip - forced
6262
ansible.builtin.pip:
6363
name:
64-
- elasticsearch
64+
- 'elasticsearch<9'
6565
- cryptography
6666
break_system_packages: true
6767
ignore_errors: true

0 commit comments

Comments
 (0)