# Perform an action on a host if at least one of the other hosts has a certain feature

**URL:** <https://forum.ansible.com/t/perform-an-action-on-a-host-if-at-least-one-of-the-other-hosts-has-a-certain-feature/24564>\
**Category:** Ansible Project\
**Created:** [May 24, 2017, 12:00pm UTC](https://forum.ansible.com/t/perform-an-action-on-a-host-if-at-least-one-of-the-other-hosts-has-a-certain-feature/24564 "2017-05-24T12:00:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martino\_Vigano](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Martino\_Vigano](https://forum.ansible.com/u/Martino_Vigano)\
**Post date:** [May 24, 2017, 12:00pm UTC](https://forum.ansible.com/t/perform-an-action-on-a-host-if-at-least-one-of-the-other-hosts-has-a-certain-feature/24564/1 "2017-05-24T12:00:55Z")

</div>

Good morning,

My playboy works on all hosts and is invoked like this:

Ansible-playbook -l customer main.yml

The customer group in the inventory is done this way:

[Customer]  
customer-ecas1  
customer-ecas2  
customer-ecas3  
…  
customer-ecasn  
customer-cti1  
…  
…  
customer-CTIN

What I would like to do is:

- First check all customer-ecasx servers
- If at least one of the customer-ecas servers has a certain feature then execute the operation on customer-cti1

it’s possible to do it?

Thank you.
