limit filters the available host list, since both hosts have the host2
tag, it does not modify the list of hosts in the play.

it reads like this once resolved

- hosts: "tag_ansible_hosts1:&tag_ansible_host2"
...

- hosts: "tag_ansible_hosts2:&tag_ansible_hosts2"

It does not limit to an existing play declaration, but imposes
additional limits to those. What you seem to want is play tags.

- hosts: tag_ansible_host1
  tags:
    - host1
  roles:
     - role1
     - role2

- hosts: tag_ansible_host2
  tags:
    - host2
  roles:
     - role2


and then run ansible with -t 'host2'



-- 
Brian Coca

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mn54VSZtgn8zKm8UX98NAp%3Dzu9Py7%2BtGWx-9crK3C7Jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to