29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
---
|
|
- when: elasticsearch_install_java
|
|
block:
|
|
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
|
get_url:
|
|
url: https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.rpm
|
|
dest: /tmp/jre-8-linux-x64.rpm
|
|
headers: 'Cookie:oraclelicense=accept-securebackup-cookie'
|
|
register: oracle_java_task_rpm_download
|
|
|
|
- name: RedHat/CentOS/Fedora | Install Oracle Java RPM
|
|
package: name=/tmp/jre-8-linux-x64.rpm state=present
|
|
when: oracle_java_task_rpm_download is defined
|
|
register: oracle_java_task_rpm_installed
|
|
tags: install
|
|
|
|
- name: RedHat/CentOS/Fedora | Install Elastic repo
|
|
yum_repository:
|
|
name: elastic_repo
|
|
description: Elastic repository for 6.x packages
|
|
baseurl: https://artifacts.elastic.co/packages/6.x/yum
|
|
gpgkey: https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
|
gpgcheck: yes
|
|
|
|
- name: RedHat/CentOS/Fedora | Install Elasticsarch
|
|
package: name=elasticsearch-{{ elastic_stack_version }} state=present
|
|
when: not elasticsearch_install_java or oracle_java_task_rpm_installed is defined
|
|
tags: install
|