hi Michael, Just want to check if this is what tags already do. "I want to run this role but only those tasks who have the following tags. That way you don't need to specify them on the command line."(Vincent above described exactly what i need). I read your solution below to use multiple roles and using role dependencies but not sure if it apply in this case. I will try to explain my use case.
I have a role, load_balancer. The tasks/main.yml has 3 tasks(check below for details), most of the time, i can assign that WHOLE role to a host. Since it is idempotent everything should just work and it is great. But some time all i really want to do is just update_config of the load_balancer,( i think is why Ansible is different from puppet or chef where a whole playbooks must be run) so in the command line i can run "--tags update_config". Because every time i want to update the config there are others step i want to do. So i created a playbook that uses this role and other modules. I named the playbook load_balancer_update_config_only.yml. But for my customers who are using this playbook, i much rather to encapsulated all the logics about the role load_balancer and tags update_config inside the playbook instead. tasks/main.yml - include: install_nginx.yml tags=install - include: update_load_balancers_json.yml tags=update_json,update_config - include: sync_nginx_config.yml tags=update_config On Saturday, October 19, 2013 9:14:17 PM UTC-4, Michael DeHaan wrote: > > The previous summary from serve: > > " I want to run this role but only those tasks who have the following > tags." > > This is what tags already do. > > I'm confused as to what you want, or think is not there. > > > On Sat, Oct 19, 2013 at 6:02 PM, <[email protected] <javascript:>>wrote: > >> I am trying to do the same thing which brought me to this post. Is this >> not possible yet? Any plans for it to be implemented? If I were to conjure >> up a patch would it get accepted? >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
