fix Opendistro task for Debian

This commit is contained in:
Nicolas Lastra 2021-10-19 12:13:20 -03:00
parent de57860585
commit af69658821
No known key found for this signature in database
GPG Key ID: 749E0D60DEC5E4D8

View File

@ -1,20 +1,32 @@
---
#- name: Install OpenDistro dependencies
# apt:
# name: [
# 'unzip', 'wget', 'curl',
# 'apt-transport-https', software-properties-common
# ]
# state: present
- name: Add openjdk repository
apt_repository:
repo: "{{ package_repos.apt.openjdk.baseurl }}"
state: present
- 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 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:
repo: "{{ package_repos.apt.openjdk.baseurl }}"
state: present
update_cache: yes
filename: 'wazuh-openjdk'
- name: Install openjdk-11-jdk
apt:
@ -34,6 +46,7 @@
apt_repository:
repo: "{{ package_repos.apt.opendistro.baseurl }}"
state: present
filename: 'wazuh-opendistro'
update_cache: yes
- name: Install OpenDistro