Search code examples
salt-project

extract context function in salt stack


When looking at context, I notice one of my variable has

In my state file I have

{% set status = salt['service.get_all'] %}

When I dump the context I see,

"Context {'status': <function get_all at 0x036E9B30>, } "

How can I extract the values of 'status' if its a function?


Solution

  • I figured it out.

    I needed to add the parenthesis

    {% set status = salt['service.get_all'] () %}