Code updates: conditionals and scoping (internals stuff)


I've recently pushed some code that is a START of getting nested scoping working in the system for variables. You can also now parameterize roles and policies with key-value args in the constructors.

I've also streamlined the syntax for conditionals so it feels less like an RPN calculator.

when="x > y" allows comparisons of variables.

when="F.os_type == 'linux'" uses facts ... the key is the "F.".

You can also evaluate and grab variables to pass them around arbitrarily using Eval(""). The Eval("") is implicit when using "when=" conditionals.

I have an item on my TODO list to make resource evaluation work such that a failed conditional on a parent resource means we can really skip the kids, versus printing "skipped" on all the kids.

All of this is probably not all that clear, but will make lots more sense when we have documentation in the coming weeks!


Updated this is a bit, there are now Debug and Assert modules and templating is more explicit - a provider may decide to template an input in the provider code, or the user may do it with T(). Modules like "Echo" automatically template their argument to avoid extra syntax.