On Tue, Aug 26, 2014 at 11:19 -0500, Tim O'Guin wrote:
> Just FYI, if you wanted to call a state module, you could use the __salt__
> ['state.single'] dict and pass the state module and arguments to that.
The different ways to call states, modules, grains, ... from within custom
grains, execution modules, custom states and so on should probably be unified
and documented in a single place. A quick grep for state.single only reveals
references to using it for calling, well, single states from the command line
and does not mention it in the context of custom states at all.
I haven't seen state.single and don't find it particularly intuitive. The
current situation in which __salt__, __grains__, __pillars__ are monkey patched
into modules and different "keys"/functionality being available at different
times is utterly confusing and, IMHO, a bit weird design wise. I'm never quite
sure what I will have access to during module evaluation, runtime or never and
how to call other functions or methods in one of the many salt Python modules.
--
Wolodja <
bab...@gmail.com>
4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC