Radical RFE: ansible should differentiate between constants and variables

19 views
Skip to first unread message

Nick Irvine

unread,
Dec 9, 2014, 5:51:47 PM12/9/14
to ansible...@googlegroups.com
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?

Toshio Kuratomi

unread,
Dec 9, 2014, 6:12:30 PM12/9/14
to ansible...@googlegroups.com
This is probably better as an idea to discuss on the devel mailing list:

https://groups.google.com/forum/#!forum/ansible-devel


-Toshio
> --
> 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-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> 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 all
Reply to author
Forward
0 new messages