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

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.