elastic/ansible-elasticsearch

7.5 : templates files are deleted

wixaw opened this issue · 3 comments

wixaw commented

Describe the feature: elastic.elasticsearch : Copy templates to elasticsearch

Elasticsearch version 7.5

Role version: (If using master please specify github sha)

JVM version (java -version):

OS version (uname -a if on a Unix-like system): centos 7

Description of the problem including expected versus actual behaviour:
files/templates-7.x is deleted
https://github.com/elastic/ansible-elasticsearch/tree/7.4.1/files

Playbook:
Please specify the full playbook used to reproduce this issue.


- name: Configuration des noeuds elasticsearch
  hosts: master_nodes
  roles:
    - role: elastic.elasticsearch
  vars:
    es_data_dirs:
        - "/local/elasticsearch/data"
    es_config:
        discovery.seed_hosts: " ----,  ----,  ----"
        cluster.initial_master_nodes: "elastic01"
        network.publish_host: "{{ ansible_host }}"
        network.host: "{{ ansible_host }}"
        network.bind_host: "0.0.0.0"
        http.port: 9200
        transport.port: 9300
        node.data: true
        node.master: true
        bootstrap.memory_lock: true
        cluster.name: " ----"
        http.cors.allow-origin: "*"
        http.cors.enabled: true
        xpack.security.transport.ssl.enabled: true
        xpack.security.transport.ssl.verification_mode: certificate
        xpack.security.transport.ssl.key:  ----
        xpack.security.transport.ssl.certificate:  ----
        xpack.security.transport.ssl.certificate_authorities: [ " ----" ]
        xpack.security.http.ssl.enabled: true
        xpack.security.http.ssl.key:   ----
        xpack.security.http.ssl.certificate:  ----
        xpack.security.http.ssl.certificate_authorities: [ " ----" ]
    es_heap_size: "3g"
    es_version: "7.5.0"
    es_version_lock: true
    ansible_user: ansible
    es_api_basic_auth_username: ----
    es_api_basic_auth_password:  ----


Provide logs from Ansible:


TASK [elastic.elasticsearch : Copy templates to elasticsearch] ***********************************************************************************************************************
[WARNING]: Unable to find 'files/templates-7.x' in expected paths (use -vvvvv to see paths)

[WARNING]: Unable to find 'files/templates-7.x' in expected paths (use -vvvvv to see paths)

[WARNING]: Unable to find 'files/templates-7.x' in expected paths (use -vvvvv to see paths)


TASK [elastic.elasticsearch : Install templates] *************************************************************************************************************************************
[WARNING]: Unable to find 'files/templates-7.x' in expected paths (use -vvvvv to see paths)

ES Logs if relevant:

jmlrt commented

Hi @wixaw,
Thanks for submitting this issue.

Templates files in files/templates-{6,7}.x were provided only as examples and for kitchen tests.
They were moved in test/integrations/files in 9b427f1.

Template installation should happen only if you set es_templates variable to true (default value is false). However it seems that it is still applied when it is set to false (default value)

I'll investigate and create a PR soon to fix it.

Meanwhile the Unable to find messages shouldn't impact you as this is just a warning message.
If you want to use Index templates, you should create your own templates files and set their path using es_templates_fileglob variable.

jmlrt commented

I'll investigate and create a PR soon to fix it.

=> #643

wixaw commented

okay, I think my cluster loaded all the time this file ^^
I will not worry about it anymore.
Merci Julien