Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
At least the following ones do not seem to be resolved properly for saltcheck states
{{ tpldir }}
{{ slspath }}
{{ sls }}
Setup
Trying to use these variables to import a jinja map file that provides settings to be used in the saltcheck state.
{%- set tplroot = tpldir.split('/')[0] %}
{% from tplroot ~ "/map.jinja" import settings with context %}
The jinja template is not found due the variables return none.
A hardcoded string works fine
{% from"path_to_state/map.jinja" import settings with context %}
Steps to Reproduce the behavior
Create a jinja map file and a saltcheck state to use it, try importing the jinja map file using tpldir or slspath variables
Expected behavior
These variables should be loaded in a similar way than it's done for state.sls
Description SLS Jinja variables described here https://docs.saltproject.io/en/latest/ref/states/vars.html are not available in the context for saltcheck.run_state_tests
At least the following ones do not seem to be resolved properly for saltcheck states {{ tpldir }} {{ slspath }} {{ sls }}
Setup Trying to use these variables to import a jinja map file that provides settings to be used in the saltcheck state.
The jinja template is not found due the variables return none.
A hardcoded string works fine
Steps to Reproduce the behavior Create a jinja map file and a saltcheck state to use it, try importing the jinja map file using tpldir or slspath variables
Expected behavior These variables should be loaded in a similar way than it's done for state.sls