# Make Ansible-managed console app highly available

**URL:** <https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782>\
**Category:** AWX Project\
**Tags:** windows\
**Created:** [March 14, 2021, 9:23pm UTC](https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782 "2021-03-14T21:23:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user29032902](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/user29032902/32/228_2.png) [@user29032902](https://forum.ansible.com/u/user29032902)\
**Post date:** [March 14, 2021, 9:23pm UTC](https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782/1 "2021-03-14T21:23:19Z")

</div>

Hi Guys,

We have an automated process that’s run within a console application. Ansible is used to manage the run-schedule. Each time the console app needs to be run, Ansible connect to the Win server and runs the task.

Right now this process is hosted on a single Windows server. I would like to have it on two servers and configure Ansible to either **(a)** load balance running the console between the two servers. Meaning, each time it’s scheduled to run, alternate between servers. Or, **(b)** always run on Server01, but if that’s down, run on Server 02.

Are there any built-in features within Ansible that we can utilise to make this easy? If not, how do you recommend we approach this?

---

<div class="post-metadata">

**Author:** ![Abdullah\_Humaid](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Abdullah\_Humaid](https://forum.ansible.com/u/Abdullah_Humaid)\
**Post date:** [March 15, 2021, 4:37pm UTC](https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782/2 "2021-03-15T16:37:10Z")

</div>

Option B is the easiest. You could create two tasks in a playbook. Task 1 targets first window server 1 and run your console app; Capture the return code from this task. Repeat the same task for window server 2, but set a condition that it runs only if the first failed.  
You will need to use the delegate\_to for each task.

---

<div class="post-metadata">

**Author:** ![Mike\_Charchuk](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mike\_Charchuk](https://forum.ansible.com/u/Mike_Charchuk)\
**Post date:** [March 15, 2021, 4:55pm UTC](https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782/3 "2021-03-15T16:55:42Z")

</div>

What about the ansible task option of run\_once. Probably the simplest method.

Mike

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [March 15, 2021, 6:57pm UTC](https://forum.ansible.com/t/make-ansible-managed-console-app-highly-available/34782/4 "2021-03-15T18:57:24Z")

</div>

Will you have to worry about shared data? If so, then you’ll need a shared storage solution, and should really think about quorom and monitoring then as well. Seems overkill.  
You could just use DNS round-robin with 2 IPs to load share.
