Comments (6)
You should be able to use the apt_repository and apt_key modules for debian. (See http://docs.ansible.com/list_of_packaging_modules.html for more info).
Here's how I have it for elasticsearch / debian in my own:
- name: Add Elasticsearch repository
apt_repository: repo="deb http://packages.elasticsearch.org/elasticsearch/{{ elasticsearch.version }}/debian stable main" state=present - name: Add Elasticsearch repository key
apt_key: url="http://packages.elasticsearch.org/GPG-KEY-elasticsearch" state=present
from ansible-elasticsearch.
For RHEL/CentOS/Fedora/etc --
The redhat.yml task file looks like this (this is logstash, but I assume es can plug in here easily) -
- name: Add Logstash repos
template: src=logstash.repo dest=/etc/yum.repos.d/logstash-{{ logstash.version }}.repo - name: Install Logstash
yum: name={{ item }} state=present
with_items:- logstash
And the template in the line above (src=logstash.repo) is in the templates directory -- and looks like this:
[logstash-{{ logstash.version }}]
name=logstash repository for {{ logstash.version }}.x packages
baseurl=http://packages.elasticsearch.org/logstash/{{ logstash.version }}/centos
gpgcheck=1
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
enabled=1
The yum module has an enablerepo parameter but I'm pretty sure we wouldn't want to use it (it doesn't persist beyond the transaction).
from ansible-elasticsearch.
(also, happy to make a PR instead if that makes your life easier ;D)
from ansible-elasticsearch.
@robynbergeron Thanks, and hold back for a moment - I'm already working on that and just not yet fully tested and committed. :)
from ansible-elasticsearch.
Sweet! Just thought I'd throw in my $.02 :)
from ansible-elasticsearch.
Implemented yum/repo usage.
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.