ansible/ansible — pull request #1502 by dhozac (2012-10-31 16:16:29+00:00)
Title: Improved lookup plugins

This is based on #1501, I'll rebase once that is merged. (Or I guess this could just be merged instead.)

This makes the lookup plugin API extensible and fixes some of the existing issues with it,
e.g. fileglob not working for includes.

It then uses that to add the variables available at the time for templating, and adds a template lookup plugin. This should in some of the easier cases solve the discussion in #1269.

For more involved cases, I'm working on a $LOOKUP(...) for the variable replacer. That's to follow...