Changes tasks

This commit is contained in:
Manuel J. Bernal 2020-04-24 18:07:37 +02:00
parent 9fc2b1e3c4
commit 7bed850905
4 changed files with 6 additions and 19 deletions

View File

@ -1,4 +1,4 @@
---
- hosts: 172.16.0.161
- hosts: es-cluster
roles:
- role: ../roles/opendistro/opendistro-elasticsearch

View File

@ -13,7 +13,7 @@ es_major_version: "7.x"
# Configure hostnames for Elasticsearch nodes
# Example es1.example.com, es2.example.com
domain_name: example.com
domain_name: wazuh.com
# The OpenDistro package repository
package_repos:

View File

@ -43,20 +43,17 @@
path: /tmp/opendistro-nodecerts
state: directory
run_once: true
when: install.changed
- name: RedHat/CentOS/Fedora | Download certificates generation tool
local_action:
module: get_url
url: https://search.maven.org/remotecontent?filepath=com/floragunn/search-guard-tlstool/1.5/search-guard-tlstool-1.5.zip
dest: /tmp/opendistro-nodecerts/search-guard-tlstool.zip
run_once: true
when: install.changed
run_once: /tmp/opendistro-nodecerts/search-guard-tlstool.zip
- name: RedHat/CentOS/Fedora | Extract the certificates generation tool
local_action: command chdir=/tmp/opendistro-nodecerts tar -xvf search-guard-tlstool.zip
local_action: command chdir=/tmp/opendistro-nodecerts unzip search-guard-tlstool.zip
run_once: true
when: install.changed
- name: RedHat/CentOS/Fedora | Add the execution bit to the binary
local_action:
@ -64,21 +61,18 @@
dest: /tmp/opendistro-nodecerts/tools/sgtlstool.sh
mode: a+x
run_once: true
when: install.changed
- name: RedHat/CentOS/Fedora | Prepare the certificates generation template file
local_action:
module: template
src: tlsconfig.yml
src: ../templates/tlsconfig.yml
dest: /tmp/opendistro-nodecerts/config/tlsconfig.yml
run_once: true
when: install.changed
- name: RedHat/CentOS/Fedora | Generate the node & admin certificates in local
local_action:
module: command /tmp/opendistro-nodecerts/tools/sgtlstool.sh -c /tmp/opendistro-nodecerts/config/tlsconfig.yml -ca -crt -t /tmp/opendistro-nodecerts/config/
run_once: true
when: install.changed
- name: RedHat/CentOS/Fedora | Copy the node & admin certificates to Elasticsearch cluster
copy:

View File

@ -2,9 +2,6 @@
- import_tasks: RedHat.yml
when: ansible_os_family == 'RedHat'
- import_tasks: Debian.yml
when: ansible_os_family == "Debian"
- name: Configure OpenDistro Elasticsearch JVM memmory.
template:
src: jvm.options.j2
@ -42,8 +39,4 @@
- init
- import_tasks: "RMRedHat.yml"
when: ansible_os_family == "RedHat"
- import_tasks: "RMDebian.yml"
when: ansible_os_family == "Debian"
when: ansible_os_family == "RedHat"