Fix indexer name format

This commit is contained in:
Alberto R 2022-03-04 16:09:38 +01:00
parent 49143dfdc6
commit dc6a5c38b1
No known key found for this signature in database
GPG Key ID: A3B78DD9E2FD8B94

View File

@ -44,7 +44,7 @@
- security - security
- name: Configure Wazuh-Indexer JVM memmory. - name: Configure Wazuh indexer JVM memmory.
template: template:
src: "templates/jvm.options.j2" src: "templates/jvm.options.j2"
dest: "{{ indexer_conf_path }}/jvm.options" dest: "{{ indexer_conf_path }}/jvm.options"
@ -66,7 +66,7 @@
notify: restart wazuh-indexer notify: restart wazuh-indexer
tags: install tags: install
- name: Ensure extra time for Wazuh-Indexer to start on reboots - name: Ensure extra time for Wazuh indexer to start on reboots
lineinfile: lineinfile:
path: /usr/lib/systemd/system/wazuh-indexer.service path: /usr/lib/systemd/system/wazuh-indexer.service
regexp: '^TimeoutStartSec=' regexp: '^TimeoutStartSec='
@ -81,18 +81,18 @@
register: files_to_delete register: files_to_delete
- name: Remove Index Files - name: Remove Index Files
file: file:
path: "{{ item.path }}" path: "{{ item.path }}"
state: absent state: absent
with_items: "{{ files_to_delete.files }}" with_items: "{{ files_to_delete.files }}"
- name: Ensure Wazuh-Indexer started and enabled - name: Ensure Wazuh indexer started and enabled
service: service:
name: wazuh-indexer name: wazuh-indexer
enabled: true enabled: true
state: started state: started
- name: Wait for Wazuh-Indexer API - name: Wait for Wazuh indexer API
uri: uri:
url: "https://{{ inventory_hostname if not single_node else indexer_network_host }}:{{ indexer_http_port }}/_cat/health/" url: "https://{{ inventory_hostname if not single_node else indexer_network_host }}:{{ indexer_http_port }}/_cat/health/"
user: "admin" # Default Indexer user is always "admin" user: "admin" # Default Indexer user is always "admin"
@ -111,7 +111,7 @@
when: when:
- hostvars[inventory_hostname]['private_ip'] is not defined or not hostvars[inventory_hostname]['private_ip'] - hostvars[inventory_hostname]['private_ip'] is not defined or not hostvars[inventory_hostname]['private_ip']
- name: Wait for Wazuh-Indexer API (Private IP) - name: Wait for Wazuh indexer API (Private IP)
uri: uri:
url: "https://{{ hostvars[inventory_hostname]['private_ip'] if not single_node else indexer_network_host }}:{{ indexer_http_port }}/_cat/health/" url: "https://{{ hostvars[inventory_hostname]['private_ip'] if not single_node else indexer_network_host }}:{{ indexer_http_port }}/_cat/health/"
user: "admin" # Default Indexer user is always "admin" user: "admin" # Default Indexer user is always "admin"