When you tag a role, you're saying "all of the tasks in this role are x",
not "run only the tasks in that role already tagged x". If you find
yourself trying to run subsets of tasks in a role, you might want to
consider breaking down your role into separate roles. A role isn't really
meant to be cut apart and have parts run separately--those would be
separate roles.

-Tim

On Tue, Apr 7, 2015 at 2:53 PM, Vijay Mohan <[email protected]> wrote:

> Here is my play book:
>
> - name: Install MySQL with replication
>   hosts: mysql-master:mysql-slave
>   user: root
>   sudo: false
>   roles:
>     - common
>     - admin-users
>     - generic-directories
>     - { role: iptables, tags: [ 'mysql-iptables'] }
>     - mysql
>
>
> I have ip tables tasks for different ports, I want to run the task depending 
> on the group of servers. I have tagged the iptables task based on the group.
>
> When i ran the play book instead of playing the tagged task, its run through 
> all the tasks defined in iptables role.
>
> Please let me know if am doing anything wrong here.
>
>  --
> 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/12942fe7-f5af-4459-a459-2bcffa49f097%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/12942fe7-f5af-4459-a459-2bcffa49f097%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAH4wdVXmDnvbXFuBw2wkBqtZ%3DYVCzaT1FS4%2B_ePg4VCL0vJ8jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to