# Question on Elasticsearch upgrade using Ansible

**URL:** https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519
**Category:** Elasticsearch
**Created:** [August 25, 2021, 7:59pm UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519 "2021-08-25T19:59:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Arunlal\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunlal_a/32/43638_2.png) [@Arunlal\_A](https://discuss.elastic.co/u/Arunlal_A)
#### Post date: [August 25, 2021, 7:59pm UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/1 "2021-08-25T19:59:20Z")

</div>

Hi,

A quick basic question to the community.

I have one three node Elasticsearch cluster (version 7.6.2) which was setup using the official Ansible role [GitHub - elastic/ansible-elasticsearch: Ansible playbook for Elasticsearch](https://github.com/elastic/ansible-elasticsearch)

As it's near to EOL, we need to upgrade the version to the latest stable one (7.14 now).

I went through the upgrade steps in [ansible-elasticsearch/multi-instance.md at master · elastic/ansible-elasticsearch · GitHub](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/multi-instance.md#upgrade-procedure) and was check the steps for "Procedure without data move"

I am little bit confused on that step.

**Can I do the following steps?**

**Way 1**

1. Upgrade the role (ansible-galaxy install --force elastic.elasticsearch,7.14)
2. Run playbook without any existing configuration changes.

**Way 2**

1. Do a rolling update manually by following [Rolling upgrades | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)
2. Upgrade the role (ansible-galaxy install --force elastic.elasticsearch,7.14) in Ansible

Will the **way 2** cause any issues for the next playbook run?

Please help me on this.

---

<div class="post-metadata">

### Author: ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)
#### Post date: [August 26, 2021, 9:25am UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/2 "2021-08-26T09:25:50Z")

</div>

> [@Arunlal\_A](#):
>
> as check the steps for "Procedure without data move

you can easily write your own ansible role for the upgrade. It is very simple.  
follow the steps in [Upgrade Elasticsearch | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html)

it is just few lines of code and you are sure whats going on.  
see my ansible code for upgrade I used for silimar upgrade

> **[GitHub - PetrSimik/elastic\_ansible\_upgrade](https://github.com/PetrSimik/elastic_ansible_upgrade)**
>
> Contribute to PetrSimik/elastic\_ansible\_upgrade development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)
#### Post date: [August 26, 2021, 9:27am UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/3 "2021-08-26T09:27:25Z")

</div>

there are few changes that has to be done in jvm.options when upgrading from 7.6.2 to 7.14  
otherwise you can do it you mentioned

---

<div class="post-metadata">

### Author: ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)
#### Post date: [August 26, 2021, 10:36am UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/4 "2021-08-26T10:36:02Z")

</div>

3 node cluster u can do manually without ansible just do yum upgrade or I do not know what linux release you have

---

<div class="post-metadata">

### Author: ![Arunlal\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunlal_a/32/43638_2.png) [@Arunlal\_A](https://discuss.elastic.co/u/Arunlal_A)
#### Post date: [August 31, 2021, 10:49am UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/5 "2021-08-31T10:49:47Z")

</div>

> [@Petr.Simik](#):
>
> [GitHub - PetrSimik/elastic\_ansible\_upgrade](https://github.com/PetrSimik/elastic_ansible_upgrade)

Thanks Peter for your quick response.

---

<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: [September 28, 2021, 10:50am UTC](https://discuss.elastic.co/t/question-on-elasticsearch-upgrade-using-ansible/282519/6 "2021-09-28T10:50:14Z")

</div>

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