Changes tasks
This commit is contained in:
parent
9fc2b1e3c4
commit
7bed850905
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
- hosts: 172.16.0.161
|
- hosts: es-cluster
|
||||||
roles:
|
roles:
|
||||||
- role: ../roles/opendistro/opendistro-elasticsearch
|
- role: ../roles/opendistro/opendistro-elasticsearch
|
||||||
|
|||||||
@ -13,7 +13,7 @@ es_major_version: "7.x"
|
|||||||
|
|
||||||
# Configure hostnames for Elasticsearch nodes
|
# Configure hostnames for Elasticsearch nodes
|
||||||
# Example es1.example.com, es2.example.com
|
# Example es1.example.com, es2.example.com
|
||||||
domain_name: example.com
|
domain_name: wazuh.com
|
||||||
|
|
||||||
# The OpenDistro package repository
|
# The OpenDistro package repository
|
||||||
package_repos:
|
package_repos:
|
||||||
|
|||||||
@ -43,20 +43,17 @@
|
|||||||
path: /tmp/opendistro-nodecerts
|
path: /tmp/opendistro-nodecerts
|
||||||
state: directory
|
state: directory
|
||||||
run_once: true
|
run_once: true
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Download certificates generation tool
|
- name: RedHat/CentOS/Fedora | Download certificates generation tool
|
||||||
local_action:
|
local_action:
|
||||||
module: get_url
|
module: get_url
|
||||||
url: https://search.maven.org/remotecontent?filepath=com/floragunn/search-guard-tlstool/1.5/search-guard-tlstool-1.5.zip
|
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
|
dest: /tmp/opendistro-nodecerts/search-guard-tlstool.zip
|
||||||
run_once: true
|
run_once: /tmp/opendistro-nodecerts/search-guard-tlstool.zip
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Extract the certificates generation tool
|
- 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
|
run_once: true
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Add the execution bit to the binary
|
- name: RedHat/CentOS/Fedora | Add the execution bit to the binary
|
||||||
local_action:
|
local_action:
|
||||||
@ -64,21 +61,18 @@
|
|||||||
dest: /tmp/opendistro-nodecerts/tools/sgtlstool.sh
|
dest: /tmp/opendistro-nodecerts/tools/sgtlstool.sh
|
||||||
mode: a+x
|
mode: a+x
|
||||||
run_once: true
|
run_once: true
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Prepare the certificates generation template file
|
- name: RedHat/CentOS/Fedora | Prepare the certificates generation template file
|
||||||
local_action:
|
local_action:
|
||||||
module: template
|
module: template
|
||||||
src: tlsconfig.yml
|
src: ../templates/tlsconfig.yml
|
||||||
dest: /tmp/opendistro-nodecerts/config/tlsconfig.yml
|
dest: /tmp/opendistro-nodecerts/config/tlsconfig.yml
|
||||||
run_once: true
|
run_once: true
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Generate the node & admin certificates in local
|
- name: RedHat/CentOS/Fedora | Generate the node & admin certificates in local
|
||||||
local_action:
|
local_action:
|
||||||
module: command /tmp/opendistro-nodecerts/tools/sgtlstool.sh -c /tmp/opendistro-nodecerts/config/tlsconfig.yml -ca -crt -t /tmp/opendistro-nodecerts/config/
|
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
|
run_once: true
|
||||||
when: install.changed
|
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Copy the node & admin certificates to Elasticsearch cluster
|
- name: RedHat/CentOS/Fedora | Copy the node & admin certificates to Elasticsearch cluster
|
||||||
copy:
|
copy:
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
- import_tasks: RedHat.yml
|
- import_tasks: RedHat.yml
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- import_tasks: Debian.yml
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
- name: Configure OpenDistro Elasticsearch JVM memmory.
|
- name: Configure OpenDistro Elasticsearch JVM memmory.
|
||||||
template:
|
template:
|
||||||
src: jvm.options.j2
|
src: jvm.options.j2
|
||||||
@ -42,8 +39,4 @@
|
|||||||
- init
|
- init
|
||||||
|
|
||||||
- import_tasks: "RMRedHat.yml"
|
- import_tasks: "RMRedHat.yml"
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- import_tasks: "RMDebian.yml"
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user