# Elasticsearch upgrade using Ansible with https

**URL:** https://discuss.elastic.co/t/elasticsearch-upgrade-using-ansible-with-https/291741
**Category:** Elasticsearch
**Created:** [December 14, 2021, 3:32am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade-using-ansible-with-https/291741 "2021-12-14T03:32:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Roberto\_Chacon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roberto_chacon/32/66317_2.png) [@Roberto\_Chacon](https://discuss.elastic.co/u/Roberto_Chacon)
#### Post date: [December 14, 2021, 3:32am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade-using-ansible-with-https/291741/1 "2021-12-14T03:32:10Z")

</div>

Hello

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](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519)

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

```auto
   - name: disable shard allocation
     uri:
       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

```auto
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!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 11, 2022, 3:33am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade-using-ansible-with-https/291741/2 "2022-01-11T03:33:08Z")

</div>

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