Installing Applications on Windows

  1. generate repo cache file, this will update the winrepo git details

  2. salt-run winrepo.update_git_repos

  3. Then update the repository cache file on your minions, exactly how it's done for the Linux package managers:

  4. salt wintarget pkg.refresh_db

  5. check all packages on target

  6. salt wintarget pkg.list_pkgs

  7. check the available versions of NPP that are available for install

  8. salt wintarget pkg.available_version npp

  9. wintarget:

  10. 6.4.2

  11. Install NPP on target

  12. salt wintarget pkg.install 'npp'

  13. (should be done in few seconds)

  14. to uninstall NPP,

  15. salt '*' pkg.remove 'npp'

  16. salt '*' pkg.purge 'npp'

  17. to add a single file (for example we want to place Putty.exe into C:\Putty) add this to the windows state file

  18. ## Putty

  19. c:\putty\putty.exe:

  20. file.managed:

  21. - source: salt://win/repo/putty/putty.exe

  22. - makedirs: True