What you did above, BTW, is apply the tag "do_stop" and "do_health_check"
to every task in your role.  This isn't what you want, I'm guessing.


On Fri, Jul 11, 2014 at 6:30 PM, Michael DeHaan <[email protected]> wrote:

> Pass the "--tags" option to ansible-playbook to run only the tags you want
> to run.
>
>
>
>
> On Fri, Jul 11, 2014 at 10:58 AM, Brendon Standing <
> [email protected]> wrote:
>
>> Hi all,
>>
>> How do you play just the tasks with set tags in your playbook? From the
>> command line you would do something like:
>> ansible-playbook -i staging deploy.yml --tags "do_stop, do_health_check"
>>
>> I would expect do be able to do the same from the playbook like:
>> - hosts: somehosts
>>   roles:
>>   - { role: connect, tags: [ 'do_stop', 'do_health_check' ] }
>>
>> However this is not working and it plays all the tasks in my role.
>>
>> Regards,
>>
>> Brendon
>>
>> --
>> 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/e064ad14-538d-4c7c-aae7-3a7c43fcfac6%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/e064ad14-538d-4c7c-aae7-3a7c43fcfac6%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/CA%2BnsWgzsygVc_V48LeodxDjYU1LwEY0Hy6f2pYqFNOP6JiVBHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to