wazuh-ansible-4.8.1/ansible-role-logstash/tasks/RedHat.yml
2017-04-04 11:01:24 -04:00

37 lines
1013 B
YAML

---
- name: download Java RPM
shell:
"curl -L -H 'Cookie:oraclelicense=accept-securebackup-cookie' -o /tmp/jdk-8-linux-x64.rpm http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.rpm"
args:
creates: "/tmp/jdk-8-linux-x64.rpm"
register: oracle_java_task_rpm_download
become: yes
tags:
- installation
- name: install RPM
action: "yum name=/tmp/jdk-8-linux-x64.rpm state=present"
when: not oracle_java_task_rpm_download|skipped
become: yes
tags:
- installation
- name: Add Elasticsearch GPG key.
rpm_key:
key: https://artifacts.elastic.co/GPG-KEY-elasticsearch
state: present
- name: RedHat | Install Logstash repo
yum_repository:
name: logstash
description: Elastic repository for 5.x packages
baseurl: https://artifacts.elastic.co/packages/5.x/yum
gpgkey: https://artifacts.elastic.co/GPG-KEY-elasticsearch
gpgcheck: yes
- name: RedHat | Install Logstash
yum: pkg=logstash-5.3.0
state=present
tags:
- init