file.managed syntax on master-less windows minion?
I've begun using salt in a master-less windows environment via the salt-call command. Pkg and configuration files for installation/configuration are stored on the local filesystem (source-controlled via subversion).
I'm attempting to copy various application conf files using salt, but I'm unable to determine the syntax needed for the "source" value of file.managed. I've tried various methods like "D:\path" and "D:\path" and "file:///D:/path", but all result in the error - Unable to determine upstream hash of source file.
Does file.managed, file.copy, etc work with the local filesystem as its source?
Yes, it works. In the minion config, you need to define file_client: local and also define file_roots with the directory that you're storing your salt files. Then when you do your salt-call --local it will resolve salt:// paths to those paths. So you just use salt:// the same as in a master-minion setup.
Thank you. Tis working indeed. I am unsure how to use most of these modules and am scouring the forums for examples of their uses in the state files - for windows systems. I'm having difficulty applying what I read in the module documentation to functions within state files. cmd.run may become my go-to and I don't think that was the intention of saltstack. Any suggestions where I may find more real-world, detailed state file examples for the configuration management of windows systems? With no salt master, I'm restricted to using salt-call.
Well, for one thing, make sure that you're looking at state modules, which are in the salt/states/ directory. The execution modules (salt/modules/ directory) are not designed for use in states.
As far as what works on Windows, a lot of stuff does, and on the state side of things, it looks very similar to what you do for Linux minions. Basically, any state modules with a matching win_*.py execution module probably works, and many don't even require a Windows-specific execution module. But no, we don't maintain a list of Windows support, though we probably should.