salt.modules.win_repo

Module to manage Windows software repo on a Standalone Minion

file_client: local must be set in the minion config file.

For documentation on Salt's Windows Repo feature, see here.

salt.modules.win_repo.genrepo()

Generate winrepo_cachefile based on sls files in the winrepo_dir

CLI Example:

salt-call winrepo.genrepo
salt.modules.win_repo.show_sls(name, saltenv='base')

New in version 2015.8.0.

Display the rendered software definition from a specific sls file in the local winrepo cache. This will parse all Jinja. Run pkg.refresh_db to pull the latest software definitions from the master.

Parameters:
  • name (str) -- The name of the package you want to view. Start from the local winrepo root. If you have .sls files organized in subdirectories you'll have to denote them with .. For example, if I have a test directory in the winrepo root with a gvim.sls file inside, I would target that file like so: test.gvim. Directories can be targeted as well as long as they contain an init.sls inside. For example, if I have a node directory with an init.sls inside, I would target that like so: node.
  • saltenv (str) -- The default environment is base
Returns:

Returns a dictionary containing the rendered data structure

Return type:

dict

CLI Example:

salt '*' winrepo.show_sls gvim
salt '*' winrepo.show_sls test.npp
salt.modules.win_repo.update_git_repos(clean=False)

Checkout git repos containing Windows Software Package Definitions.

Important

This function requires Git for Windows to be installed in order to work. When installing, make sure to select an installation option which permits the git executable to be run from the Command Prompt.

clean
: False

Clean repo cachedirs which are not configured under winrepo_remotes.

Note

This option only applies if either pygit2 or GitPython is installed into Salt's bundled Python.

Warning

This argument should not be set to True if a mix of git and non-git repo definitions are being used, as it will result in the non-git repo definitions being removed.

New in version 2015.8.0.

CLI Example:

salt-call winrepo.update_git_repos