By constant, I mean all variables that can be computed prior to any tasks 
being run and will not change, like inventory_hostname. Variables are 
therefore things that may change due to a task being executed.

The idea is that any "when" clause that contains only constants can also be 
evaluated prior to any tasks being executed, and thereby potentially 
excluded. Right now, the --list-tasks flag is rather silly: it prints tasks 
that are conditionally skipped.  Yes, there's the --check flag, but it has 
its own problems (not supported by all modules).

It also means if somehow no tasks are going to be run on host X, we can 
essentially exclude it, skipping gathering tasks.

Right now, I work around the problem by including a human-friendly 
description of the when condition in the task name, but this obviously 
sucks.

Stupid? Impossible?

-- 
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/ce14e4ac-8b54-4b56-9675-b038ab4985f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to