Hi,

Thanks for getting back to me. I understand that in my case it is a valid
warning for what it was designed for. Where I disagree is the warning being
present in the first place.

I admit that my use case is different, but as a new person to Ansible, it
is confusing why there's a lack of consistency between when and
changed_when and the rest of Ansible.

I do agree that my usage would result in double interpolation and I did
consider that. But I wanted, and perhaps poorly explained, to take a step
up a level to the lack of consistency as I see it with the rest of Ansible.

As I mentioned, I'm new to Ansible. But this seeming lack of consistency
between Jinja delimiters is what caused my frustration. I expected to be
able to use Jinja delimiters and was surprised when I couldn't.

I hope that makes more sense on what I'm looking for.



On Thu, May 25, 2017 at 5:39 AM Brian Coca <bc...@ansible.com> wrote:

> @Micheal, in your case having the extra moustaches ({{ }}) would cause
> unwanted double interpolation, @Rich is actually using that on
> purpose. So the warning was valid in your case, but not his.
>
> For templating there are mainly 2 rules (though 2nd is actually
> consequence of the first):
>
> - moustaches don't stack: {{ {{ }} }} <= you should not use tempating
> inside templating, normally you want contactenation or hostvars[]
> - Always use moustaches except when `when:` <= conditionals are
> 'expressions' so they already have an implied template which then hits
> rule #1
>
>
>
> ----------
> Brian Coca
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to