Minion management from salt server

I have done salt server set up on ( ubuntu 12.04)and minion(windows server 2008 r2) as per http://salt.readthedocs.org/ , Now i want to copy a folder includes .Exe files on it to minion in specific path and execute it, where my salt-minion(win 2008 r2) is having credentials ?

Answer

For file management, there’s a salt module for that. It works pretty good: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html

'c:\path\to\folder':
   - file.recurse:
     - source: salt://path/to/files/on/server

To run the executable – take a look at the cmd state: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html

'c:\path\to\executable':
   cmd.run

Attribution
Source : Link , Question Author : Natasha , Answer Author : Steve Butler

Leave a Comment