-
-
Notifications
You must be signed in to change notification settings - Fork 642
Allow user defined post-provision-tasks to use tags while drupal vm does not #1061
Conversation
Nevermind, that didn't work. @geerlingguy if it's possible to make this work somehow? |
@oxyc - What's not working? Did you add a tag to a custom task, then set the arg in the vagrant command, and it didn't use just that tag? |
@oxyc - Also note that tags should always be in an array (I'm 99% sure)—so, like |
If I tag the I was hoping I could somehow read the included file, and only execute the tasks within that file that had a particular tag. Seems that's not possible as |
@geerlingguy if you have any ideas on how to allow this, I'm very interested :) |
Hmm... |
That |
I'll keep this open as a reminder to take a look at the ansible issue queue. |
It does work, I was just being an idiot. We only need to tag the tasks that allow Oh, and Ready for review. |
Ah yes... I just always do a list in case I need to modify it. It just feels more correct to me... I'm one of those insane people that dictates PHP functions should only return one and only one type (e.g. empty array, or array... not null, array, FALSE, etc.). Can you change it? |
There you go! |
At the moment Drupal VM does not use ansible tags out of the box, but I wanted to use it for my own custom post-provision tasks. By default all the pre/post-provision tasks are excluded as the include statements are without tags.
This PR fixes the issue by delegating the decision of tags to the post-provision scripts. Rather than setting the tag to
user-provision
or something similar, I think they should be set it toalways
so that users can take full advantage of tags. http://docs.ansible.com/ansible/playbooks_tags.html#special-tagsDRUPALVM_ANSIBLE_ARGS='--tags=foobar' vagrant provision
Currently I'm only tagging the config includes and the post/pre-provision tasks. But maybe we should also tag Include OS-specific variables. and such?