Comments (7)
Hi @geoffroya i've made some changes which should ensure the java version is only updated if the an update_java param is passed. I'll make further improvements to perform a repo update in this scenario also. This should avoid unnecessary checks.
I have concerns the above approach may cause issues where a non-compatible version of java is installed. What about a flag install_java, with a default value of true. If false, we skip the java install.
@dliappis thoughts?
from ansible-elasticsearch.
@gingerwizard agreed. I assume @geoffroya is referring to a situation where java has been installed without a package manager, hence the checking for the executable in the shell PATH.
Your recommendation for an install_java
flag defaulting to True
sounds reasonable to me.
I thought for a second if we could make this slightly more intelligent, e.g. check if there is already a java package installed and then set install_java=false
(which would be overridable), but the lack of a list
option for the package
module would make all of this cumbersome.
from ansible-elasticsearch.
@geoffroya we will add a flag for the next release. Feel free to make the pull request or i'll just add when i have a moment. Thanks for the feedback either way!
from ansible-elasticsearch.
I've created a pull request to add the flag, as suggested by @dliappis
from ansible-elasticsearch.
@geoffroya resolved through #107
from ansible-elasticsearch.
If you install java with alternative it will not work. Even I tried with command with that I can install java but unable to determine whether java was exist or not so looking for else if or kind of filter in playbook
from ansible-elasticsearch.
-
name: check
hosts: all
become: true
gather_facts: false
tasks:-
name: print a message
command: java -version 2>&1 | grep version | awk '{print $3}' | sed 's/"//g'
register: version
ignore_errors: True -
name: print java version
debug:
msg: " {{ version i}} "
when: " version.rc == 0 " -
name: install java version
command: "{{ item }}"
when: "version.rc !=0"
with_items:- alternatives --install /usr/sbin/java java /ql/java/jdk1.8.0_152/bin/java 1000
-
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.