To expand on Matt's answer, it's because they aren't really in scope yet.

If you can imagine having 500 different hosts, each with a different value
of "x", what would be printed for:

"TASK: {{ x }}"

in the header?

Well, we don't know what the value of x is yet at this point in time, but
we do in the tasks below it.   But we can't show 500 values in the header.

So that's why it is the way is there.



On Tue, Sep 16, 2014 at 8:32 AM, Matt Martz <[email protected]> wrote:

> In order for this to work the variable cannot be a host var or by
> extension not a group_var.  It must be a variable that is defined globally
> such as from:
>
> 1. vars
> 2. vars_files
> 3. --extra-vars/-e
> 4. role invocation ( - { role: foo, some_var: bar } )
>
> There are others, but the important thing is that vars from inventory,
> host_vars and group_vars will not work.  The reason for this is that the
> var could be different for each host and it would make sense, as well as
> name being printed before the hosts are inspected.
>
> On Mon, Sep 15, 2014 at 9:32 PM, Stephen Aylward <
> [email protected]> wrote:
>
>> When running my playbook, on tasks that I have tried to name with
>> variables, the variable name is there rather than the value.
>> Eg:
>> TASK: [weblogic | Create {{ tmp_dir }}] **************************
>>
>> What do I need to change to get the tmp dir value output?
>> Thanks
>>
>> --
>> 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/952d8dbc-c468-4bcf-9696-e6e5bfeb51db%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/952d8dbc-c468-4bcf-9696-e6e5bfeb51db%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matt Martz
> [email protected]
> http://sivel.net/
>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAD8N0v_B91Ziem-6yKKGjKzfgqdBtaskcab1w7Bm3YKEEJkvbw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAD8N0v_B91Ziem-6yKKGjKzfgqdBtaskcab1w7Bm3YKEEJkvbw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyC1rod5DL%2BR7S5YEjQrT6dKdG7DypMbxt_wYpcsHj9AQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to