This is one option I have used in the past

On Tuesday, 17 March 2020 08:33:46 UTC+2, דודו דודו wrote:
>
> HI, 
>
> I have a task that runs only on servers that are under Kafka group. How 
> can i run the task on Kafka and Webserver groups only.
>
> Thanks
>
> - name: install java-8-openjdk' packages
>   yum:
>     name: ['java-1.8.0-openjdk']
>     state: latest
>     when: "'kafka' in group_names"
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4a6b7ee4-a9d0-4bcc-8415-93bc596e3f3d%40googlegroups.com.

Reply via email to