Masterless Windows Salt minion - Where to keep state files

Viewed 472

I have install salt-minion on windows machine and made it masterless.

Where do i keep state files, so that salt is able to find them.

Currenlty, when i keep it in C:\salt and run salt-call state.sls test -l debug, i get the following log,

[DEBUG   ] LazyLoaded roots.envs
[DEBUG   ] Could not LazyLoad roots.init: 'roots.init' is not available.
[DEBUG   ] Updating roots fileserver cache
[DEBUG   ] Determining pillar cache
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[DEBUG   ] Could not find file 'salt://test.sls' in saltenv 'base'
[DEBUG   ] Could not find file 'salt://test/init.sls' in saltenv 'base'
[DEBUG   ] compile template: False
[ERROR   ] Template was specified incorrectly: False
[DEBUG   ] LazyLoaded highstate.output
local:
    Data failed to compile:
----------
    No matching sls found for 'test' in env 'base'
1 Answers

Salt keeps state files in the directory(ies) configured by the file_roots variable. To find the location(s), run from a command prompt:

python2 -c 'import salt.config; master_opts = salt.config.client_config("/etc/salt/master"); print(master_opts["file_roots"])'
Related