Merge pull request #651 from wazuh/650-roles-opendistro
Improve tasks in Opendistro
This commit is contained in:
commit
a17ef98093
@ -1,20 +1,32 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#- name: Install OpenDistro dependencies
|
- name: Update cache
|
||||||
# apt:
|
apt:
|
||||||
# name: [
|
update_cache: yes
|
||||||
# 'unzip', 'wget', 'curl',
|
|
||||||
# 'apt-transport-https', software-properties-common
|
|
||||||
# ]
|
|
||||||
# state: present
|
|
||||||
|
|
||||||
- name: Add openjdk repository
|
- name: Debian 9 (Stretch)
|
||||||
|
when: (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "9")
|
||||||
|
block:
|
||||||
|
|
||||||
|
- name: Install OpenDistro dependencies
|
||||||
|
apt:
|
||||||
|
name: [
|
||||||
|
'unzip', 'wget', 'curl', 'apt-transport-https', software-properties-common
|
||||||
|
]
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add the repository key for Debian's Stretch Backports repository
|
||||||
|
ansible.builtin.apt_key:
|
||||||
|
keyserver: keyserver.ubuntu.com
|
||||||
|
id: 648ACFD622F3D138
|
||||||
|
|
||||||
|
- name: Add openjdk repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ package_repos.apt.openjdk.baseurl }}"
|
repo: "{{ package_repos.apt.openjdk.baseurl }}"
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "9")
|
filename: 'wazuh-openjdk'
|
||||||
|
|
||||||
- name: Install openjdk-11-jdk
|
- name: Install openjdk-11-jdk
|
||||||
apt:
|
apt:
|
||||||
@ -34,6 +46,7 @@
|
|||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ package_repos.apt.opendistro.baseurl }}"
|
repo: "{{ package_repos.apt.opendistro.baseurl }}"
|
||||||
state: present
|
state: present
|
||||||
|
filename: 'wazuh-opendistro'
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Install OpenDistro
|
- name: Install OpenDistro
|
||||||
|
|||||||
@ -14,9 +14,13 @@
|
|||||||
- name: Remove performance analyzer plugin from elasticsearch
|
- name: Remove performance analyzer plugin from elasticsearch
|
||||||
become: true
|
become: true
|
||||||
command: ./elasticsearch-plugin remove opendistro-performance-analyzer
|
command: ./elasticsearch-plugin remove opendistro-performance-analyzer
|
||||||
ignore_errors: true
|
|
||||||
args:
|
args:
|
||||||
chdir: /usr/share/elasticsearch/bin/
|
chdir: /usr/share/elasticsearch/bin/
|
||||||
|
register: remove_elasticsearch_performance_analyzer
|
||||||
|
failed_when:
|
||||||
|
- remove_elasticsearch_performance_analyzer.rc != 0
|
||||||
|
- '"not found" not in remove_elasticsearch_performance_analyzer.stderr'
|
||||||
|
changed_when: "remove_elasticsearch_performance_analyzer.rc == 0"
|
||||||
|
|
||||||
- name: Remove elasticsearch configuration file
|
- name: Remove elasticsearch configuration file
|
||||||
file:
|
file:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user