DEV Community

Anuja Piayadigama
Anuja Piayadigama

Posted on

How to run Ansible tasks for each server separately

I have an inventory file like below.

[all:vars]
ansible_user=root
zookeeper_new=true
[zookeepers]
10.16.0.31
10.16.0.32

Inside my .yml file where I have declared the tasks, I would like to run all of those tasks first in the server 31 and after that on server 32. Is that possible and if so, how

Top comments (0)