Basically think of it as each variable (for a large infrastructure) basically having 500 different values
Ansible can't tell the variable has only *one* value, since the variable is "inventory scope" as such, it can't plug it in, because the task header (that preceeds the next 500 task results) would not apply equally to all hosts. So it's a cosmetic thing, but done for a very good (if not slightly confusing!) reason. On Mon, Dec 15, 2014 at 12:44 PM, Brian Coca <[email protected]> wrote: > > 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. > -- 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%2BnsWgy7fTJPwXNNXY5z4Nio6HR28Bb2C-XMj%3DzKhzDUPyGBoQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
