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.winrepo.
genrepo
()¶Generate winrepo_cachefile based on sls files in the winrepo_dir
CLI Example:
salt-call winrepo.genrepo
salt.modules.winrepo.
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.
Note
This function does not ask a master for an sls file to render. Instead it directly processes the file specified in name
str (saltenv) -- The name/path of the package you want to view. This can be the
path to a file on the minion file system or a file on the local (full) --
cache. (minion) --
str -- The default environment is base
Returns a dictionary containing the rendered data structure
Note
To use a file from the minion cache start from the local winrepo root
(C:\salt\var\cache\salt\minion\files\base\win\repo-ng
). If you have
.sls
files organized in subdirectories you'll have to denote them
with .
. For example, if you have a test
directory in the winrepo
root with a gvim.sls
file inside, 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 you have a node
directory with an init.sls
inside, target that like so: node
.
CLI Example:
salt '*' winrepo.show_sls gvim
salt '*' winrepo.show_sls test.npp
salt '*' winrepo.show_sls C:\test\gvim.sls
salt.modules.winrepo.
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 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