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 范例:

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

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.

参数:
  • 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 a dictionary containing the rendered data structure

返回类型:

dict

CLI 范例:

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.

重要

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.

注解

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

警告

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.

2015.8.0 新版功能.

CLI 范例:

salt-call winrepo.update_git_repos