Elasticsearch upgrade using Ansible with https


I have been following the following post, there is one response that provide an ansible script that seems to do all the magic.

Question on Elasticsearch upgrade using Ansible

I have found a blocker that my setup is using security and have not been able to connect to the Elasticsearch https url.

Here is what I have on my playbook

   - name: disable shard allocation
       url: https://master01.domain.net:9200/_cluster/settings
       user: "{{ elastic_user }}"
       password: "{{ elastic_password }}"
       body: '{"persistent":{"cluster.routing.allocation.enable":"primaries"}}' # specify no shard allocation
       force_basic_auth: yes
       validate_certs: no
       client_cert: /ansible_files/certificate.pem
       body_format: json
       method: PUT

Getting this error message

TASK [disable shard allocation] ****************************************************************************************************************************************************
fatal: [master01.domain.net]: FAILED! => {"changed": false, "content": "", "elapsed": 0, "msg": "Status code was -1 and not [200]: Connection failure: [Errno 2] No such file or directory", "redirected": false, "status": -1, "url": "https://master01.domain.net:9200/_cluster/settings"}

Any clues what is missing or provide any pointers?

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.