short answer: yes, this is expected behaviour

long one:
#1 happens because of main/defaults.yml has the lowest precedence
possible and vars there don't get merged in until task execution,
name: gets set during task definition, this is because host vars are
allowed to override them. You can use vars/main.yml for 'non
overridable' higher precedence vars.

#2 happens because jinja2 is given the full name:  string to evaluate,
and it throws a 'variable undefined error' (with default settings)
which we capture, ignore and return the original string, this is done
in some cases (like name:) as it should not play/task execution.

Using vars, extra vars or role vars (but not defaults) should give you
what you need for task names.

-- 
Brian Coca

-- 
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/CAJ5XC8%3Dc%2BrK2BBSgyVW3RXF_zZayvT3d%2BK4JLdtPGDO%3DD8UdDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to