Comments (8)
@martinb3 I think the term "idempotency" is misleading us. We don't want to install idempotently plugins (as you mentioned it, Elasticsearch can't do that), but we wanted to run idempotently our ansible tasks.
Indeed, we can do that with "hacking" (by using shell, conditions, loop, etc.) or we can do it properly in an ansible style (with module already included since ansible 2.0).
For the point you're referring to:
version no None
Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated
Yes, right now the module wont update, but it wont break anything and can be run as many time you want (that is idempotency for ansible task)
Furthermore, I've submitted this PR to let user decided if he wanted to force install a plugin.
from ansible-elasticsearch.
Thanks for reporting @marji . As a temporary workaround, at least for elastic provided plugins, you can set es_plugins_reinstall: true
, which will cause a reinstall of all plugins on the second run.
The issue is caused by the role currently not checking which plugins are already installed.
@gingerwizard I think you already looked into a solution to something like this. Any ideas?
from ansible-elasticsearch.
So far my workaround for this issue is to explicitly tell the task to don't fail when plugins exist. See the PR #113 .
The great way would be to don't try to re-install plugins if they exist without an es_plugins_reinstall: true
, but I went into plugins names issue. Where some plugins have a different name (short one) when they are installed. Ex: mobz/elasticsearch-head become head when installed. fixed with #113
A second solution could be elactisearch_plugin module
from ansible-elasticsearch.
@barryib agreed lets use the plugin module.
from ansible-elasticsearch.
Can be addressed with #125
from ansible-elasticsearch.
@barryib Since Elasticsearch itself can't idempotently install plugins, I'm not sure how different Ansible modules would solve the problem. From the docs to the module you linked:
version no None
Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated
That to me sounds like not idempotent either, if giving a version and it won't actually be installed in every case.
For what it's worth, we have the same problem in the Chef cookbook for Elasticseach. :/
from ansible-elasticsearch.
Thank you for clarifying that -- I guess if the module doesn't do anything, it would technically be idempotent. Usually I think of idempotency in configuration management as "run it as many times as you want, and it will always bring the system into the same state, or do nothing if the system is already in the desired state." Anyway, yeah -- I wish we could do more with Elasticsearch's plugin system :)
from ansible-elasticsearch.
I'll tested this a while back and i believe its resolved. It should be tested under #43 which i will try to include shortly.
from ansible-elasticsearch.
Related Issues (20)
- Failure in "Debian - Ensure elasticsearch is installed" HOT 4
- FR: Install Elasticsearch-plugins with this role HOT 2
- Wrong elasticsearch.keystore permissions forbid elasticsearch.service from starting HOT 6
- issue with "could not find java in bundled JDK" HOT 2
- Does not accept static IP config Eg: transport.host: <hostname>" HOT 2
- gpg dependencies missing HOT 3
- Segmentation fault in JNA library due to non-existent home directory for elasticsearch user HOT 2
- Specifying `path.data` as a list is deprecated in Elasticsearch 7.13 HOT 2
- Turn on systemd on OracleLinux HOT 2
- kibana connect to elastic HOT 1
- Bootstrapping a new/additional instance with activated security fails HOT 1
- Single node cluster configuration HOT 2
- Playbook not working with rh8 HOT 3
- filter_plugins/custom.py is skipped when ansible is installed through pip HOT 2
- Hacktoberfest participation
- ssl-tls-setup.md should point to location of bin/elasticsearch-certutil HOT 2
- Role fails when pointed to es_ssl_keystore / es_ssl_truststore using CA and Cert created with bin/elasticsearch-certutil HOT 4
- Upload pem certs from local to remote
- Safe options for log4j2 - CVE-2021-44228 HOT 4
- How to remove always tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-elasticsearch.