wazuh-ansible-4.8.1/roles/opensearch/wazuh-indexer/tasks/Debian.yml
2022-02-02 13:17:37 -03:00

61 lines
1.6 KiB
YAML

---
- name: Update cache
apt:
update_cache: yes
- name: Debian 9 (Stretch)
when: (ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] == "9")
block:
- name: Install Wazuh-Indexer dependencies
## 732 change task name
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:
# repo: "{{ package_repos.apt.openjdk.baseurl }}"
# state: present
# update_cache: yes
# filename: 'wazuh-openjdk'
#- name: Install openjdk-11-jdk
### 732 will not be needed as indexer comes with the jdk.
# apt:
# name: openjdk-11-jdk
# state: present
# environment:
# JAVA_HOME: /usr
- name: Add Wazuh-Indexer repository
block:
## 732 the wazuh repo should be added instead
- name: Add apt repository signing key
apt_key:
url: "{{ package_repos.apt.indexer.gpg }}"
state: present
- name: Add Opendistro repository
apt_repository:
repo: "{{ package_repos.apt.indexer.baseurl }}"
state: present
filename: 'wazuh-opendistro'
update_cache: yes
- name: Install Wazuh-Indexer
## the indexer package should be installed instead
apt:
name: wazuh-indexer={{ indexer_version }}-1
state: present
register: install
tags: install