I need to limit ansible to run specific role by limiting with groups in 
inventory. The inventory and role layouts listed below cannot be changed in 
our environment.

For example :

Inventory  (all three groups have same server) :





- hosts: group1
  roles: role1

- hosts: group2
  roles: role2

- hosts: group3
  roles: role3

When I run this :

ansible-playbook test.yml -i <> -t update_config -C -K -l 'group1' 

This is running all the roles. I understand since the target is a single 
node and it is in all groups, it is by design to work like this. But is 
there are any workaround for this to limit running role to specific group. 
(Not by using specific tags again since we already have multiple tags 
within our roles)

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to