# Interserver dependencies

**URL:** <https://forum.ansible.com/t/interserver-dependencies/21699>\
**Category:** Ansible Project\
**Created:** [June 8, 2016, 2:27pm UTC](https://forum.ansible.com/t/interserver-dependencies/21699 "2016-06-08T14:27:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony.t.may](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.t.may](https://forum.ansible.com/u/anthony.t.may)\
**Post date:** [June 8, 2016, 2:27pm UTC](https://forum.ansible.com/t/interserver-dependencies/21699/1 "2016-06-08T14:27:25Z")

</div>

New to Ansible. Looking for help with orchestrating actions which depend on the state of applications on other servers. Can this be done in Ansible?

Scenario:

server 1 running app 1  
server 2 running app 2  
server 3 running app 3

Need to stop app2 on server 2 but app 2 must not be stopped if either app 1 or app 3 is up - app1 and app 3 are client apps which would crash if app2 was brought down  
i.e. need to know the state of app 1 and app 3 at the time a stop of app 2 is attempted to make a decision whether to proceed or not

In other words can the state of multiple components on various servers be maintained and tested before an action is performed. Essentialy a state machine paradigm.

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [June 8, 2016, 2:54pm UTC](https://forum.ansible.com/t/interserver-dependencies/21699/2 "2016-06-08T14:54:59Z")

</div>

Hi,

Perhaps you should have a look at this page :

[http://docs.ansible.com/ansible/playbooks\_delegation.html](http://docs.ansible.com/ansible/playbooks_delegation.html)

I think you should use serial & max\_fail\_percentage...

But that does'nt change your organisation : you should test all changes on qualification servers before production ones...

Regards,

JYL

---

<div class="post-metadata">

**Author:** ![anthony.t.may](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.t.may](https://forum.ansible.com/u/anthony.t.may)\
**Post date:** [June 8, 2016, 9:26pm UTC](https://forum.ansible.com/t/interserver-dependencies/21699/3 "2016-06-08T21:26:23Z")

</div>

Thanks JYL. Looks promising. Will have a closer look.
