Basically this would be asking for a play level "use_tags" parameter.
 (It would not be called "tags", as that would mean the existing ability
*to tag*)

This is not something we are working on, but patches would be considered
certaintly, the variable should only exist at play level (on level with
"hosts:").




On Sun, Jul 20, 2014 at 6:06 AM, Michael Liu <[email protected]> wrote:

> I know you have to ability to call task tags from the command line, for
> example:
>
> ansible-playbook -i staging_env mydeploy.yml --tags "web_stop"
>
> But, is there a way to call task tags from with in a playbook?  I would
> rather create multiple playbooks such as web_start.yml, web_deploy.yml,
> stop_all.yml, start_all.yml and not have to worry about calling the
> appropriate tags at the command line.  My issue is that not everyone on the
> Ops team is as familiar with ansible (and all of the tags we use), so
> allowing them to just run "ansible-playbook -i staging_env start_all.yml"
> seems easier and safer.  And the goal is to keep my existing role/tasks
> structure without duplicating tasks between roles.  The main issue with the
> playbook is that when you apply a role to hosts it applies all of the tasks
> in that role, no way to pick and choose tasks in the playbook.
>
> My dir structure for my web servers is as follows:
>     roles/web/tasks
>         main.yml
>         stop.yml
>         update_code.yml
>         start.yml
>         check_service.yml
>
> If it's not possible to call task tags from a playbook, is this something
> you're currently working?  Is there another way to achieve this?
>
> Thanks so much for your time.
>
> --
> 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/7e93c579-5ecc-426d-b168-728c06e946a7%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7e93c579-5ecc-426d-b168-728c06e946a7%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%2BnsWgwMzSuBcou_pgBtRBbmOYYf5R_ttUd%2BK0mr844PDuMbSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to