variable expansion in -name: inconsistent?

I have been reviewing 1.2 documentation and playing with some examples along the way. IMHO, the handling of variable expansion in --name is inconsistent so far. variables defined in a playbook, such as host, gets expanded properly, as shown in the following example.

$ cat test_raw.yml

I should have added that my expectation was set while reading the following:
http://www.ansibleworks.com/docs/playbooks.html

quoted "If there are discovered variables about the system, called ‘facts’, these variables bubble up back into the playbook, and can be used on each system just like explicitly set variables. "

Well, what I have observed so far doesn’t really match the “just like explicitly set variables.” :sunglasses:

– Zack
[…]

This is not inconsistent actually.

Think about how and where variables are in scope and when they are not.

A task object applies to a set of hosts and then shows output for each one.

The task header can’t have inventory variables applied yet, so it templates only what it can.

The answer here is to just be ok with it, or not put variables in the name unless they are not applicable to just a few of the hosts.