Hi,

Am 11.07.2014 um 21:30 Uhr schrieb Dmitry Makovey:
On Wednesday, July 9, 2014 4:50:55 PM UTC-6, Michael DeHaan wrote:

I'm asking is something more like:
{ role: roleA, use-tags: tagY } which would be similar to the CLI
"--tags" except localized down to a roleA only and exectuting *only*
tasks tagged tagY from roleA.
I'd like that too!

My usecase: I've got playbook that does both install and setup. However
install should really be ran once and setup, well, as many times as I
please :) for each role in my playbook I'd like to use common vars and
some of the files, like templates and scripts. So, I would like to be
able to write 2 playbooks: 1st_run.yml that uses "normal" role notation
and invokes all the tasks under that role, and then "setup.yml" which
would use above mentioned syntax for role: { role: roleA, use-tags:
setup }. Passing --tags with CLI is a bit too blunt for the cases where
I want all tags to run for roleB, for example.  use of "when" and
conditional vars for the same purpose becomes cumbersome as now I have
to handle mutiple "when" statements for some tasks etc. Tags IMO present
a way more elegant solution.
I would like to have the equivalent to
# ansible-playbook -i Testing/ ldap.yml --tags=ldap_schema mailserver
in a Playbook.
There is no way to do this at the moment, am I right?

I could put it in a shell script, but this does not feel right …


Marc

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5672E09B.3020701%40ofd-z.niedersachsen.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to