Hi,

> I just opened https://github.com/ansible/ansible/issues/79874 and
> Matt explained that 2.14 change is working as designed and closed the
> issue.
> 
> Matt put a link in the issue describing variable lazy eval and how 
> undefined variables now work:
> https://docs.ansible.com/ansible-core/2.14/porting_guides/porting_guide_core_2.14.html#playbook

if someone is interested, the implementation of that change happened in
https://github.com/ansible/ansible/pull/56116

> I believe I'm tracking those changes, but I'm still lost on how my
> use case can be implemented.  My specific use case was a task's when
> clause determining to execute based on a top level variable being
> "authored".  If the author made a mistake in the nested elements,
> then an exception is desired.  How can this use case be implemented
> in 2.14?

I'm not sure it can actually be implemented anymore, at least for
something that works in the form of `nested is my_undefined_test`.
Maybe it is still possible to do something like `"nested" is
my_undefined_test`, where `my_undefined_test` is a custom test plugin
which checks whether a global object of that name seems to exist. But
that depends on how Jinja2 internally works, which I know too little
about.

Best,
Felix


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20230201213059.0fb76e6b%40rovaniemi.

Reply via email to