Directly manage the Salt fileserver plugins
salt.runners.fileserver.
clear_cache
(backend=None)¶2015.5.0 新版功能.
Clear the fileserver cache from VCS fileserver backends (git
, hg
, svn
). Executing this runner with no arguments will
clear the cache for all enabled VCS fileserver backends, but this
can be narrowed using the backend
argument.
-
), then these backends will be
excluded from the enabled backends. However, if there is a mix of
backends with and without a minus sign (ex: backend=-roots,git
)
then the ones starting with a minus sign will be disregarded.CLI 范例:
salt-run fileserver.clear_cache
salt-run fileserver.clear_cache backend=git,hg
salt-run fileserver.clear_cache hg
salt-run fileserver.clear_cache -roots
salt.runners.fileserver.
clear_lock
(backend=None, remote=None)¶2015.5.0 新版功能.
Clear the fileserver update lock from VCS fileserver backends (git
, hg
, svn
). This should only need to be done if a fileserver
update was interrupted and a remote is not updating (generating a warning
in the Master's log file). Executing this runner with no arguments will
remove all update locks from all enabled VCS fileserver backends, but this
can be narrowed by using the following arguments:
remote
value of github
will remove the lock from all github.com remotes.CLI 范例:
salt-run fileserver.clear_lock
salt-run fileserver.clear_lock backend=git,hg
salt-run fileserver.clear_lock backend=git remote=github
salt-run fileserver.clear_lock remote=bitbucket
salt.runners.fileserver.
dir_list
(saltenv='base', backend=None, outputter=None)¶Return a list of directories in the given environment
Narrow fileserver backends to a subset of the enabled ones. If all
passed backends start with a minus sign (-
), then these backends
will be excluded from the enabled backends. However, if there is a mix
of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus sign will
be disregarded.
2015.5.0 新版功能.
CLI 范例:
salt-run fileserver.dir_list
salt-run fileserver.dir_list saltenv=prod
salt-run fileserver.dir_list saltenv=dev backend=git
salt-run fileserver.dir_list base hg,roots
salt-run fileserver.dir_list -git
salt.runners.fileserver.
empty_dir_list
(saltenv='base', backend=None, outputter=None)¶2015.5.0 新版功能.
Return a list of empty directories in the given environment
Narrow fileserver backends to a subset of the enabled ones. If all
passed backends start with a minus sign (-
), then these backends
will be excluded from the enabled backends. However, if there is a mix
of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus sign will
be disregarded.
CLI 范例:
salt-run fileserver.empty_dir_list
salt-run fileserver.empty_dir_list saltenv=prod
salt-run fileserver.empty_dir_list backend=roots
salt.runners.fileserver.
envs
(backend=None, sources=False, outputter=None)¶Return the available fileserver environments. If no backend is provided, then the environments for all configured backends will be returned.
Narrow fileserver backends to a subset of the enabled ones.
在 2015.5.0 版更改: If all passed backends start with a minus sign (-
), then these
backends will be excluded from the enabled backends. However, if
there is a mix of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus
sign will be disregarded.
Additionally, fileserver backends can now be passed as a
comma-separated list. In earlier versions, they needed to be passed
as a python list (ex: backend="['roots', 'git']"
)
CLI 范例:
salt-run fileserver.envs
salt-run fileserver.envs backend=roots,git
salt-run fileserver.envs git
salt.runners.fileserver.
file_list
(saltenv='base', backend=None, outputter=None)¶Return a list of files from the salt fileserver
Narrow fileserver backends to a subset of the enabled ones. If all
passed backends start with a minus sign (-
), then these backends
will be excluded from the enabled backends. However, if there is a mix
of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus sign will
be disregarded.
2015.5.0 新版功能.
CLI Examples:
salt-run fileserver.file_list
salt-run fileserver.file_list saltenv=prod
salt-run fileserver.file_list saltenv=dev backend=git
salt-run fileserver.file_list base hg,roots
salt-run fileserver.file_list -git
salt.runners.fileserver.
lock
(backend=None, remote=None)¶2015.5.0 新版功能.
Set a fileserver update lock for VCS fileserver backends (git
, hg
, svn
).
注解
This will only operate on enabled backends (those configured in
fileserver_backend
).
remote
value of *github.com*
will remove the lock from all github.com remotes.CLI 范例:
salt-run fileserver.lock
salt-run fileserver.lock backend=git,hg
salt-run fileserver.lock backend=git remote='*github.com*'
salt-run fileserver.lock remote=bitbucket
salt.runners.fileserver.
symlink_list
(saltenv='base', backend=None, outputter=None)¶Return a list of symlinked files and dirs
Narrow fileserver backends to a subset of the enabled ones. If all
passed backends start with a minus sign (-
), then these backends
will be excluded from the enabled backends. However, if there is a mix
of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus sign will
be disregarded.
2015.5.0 新版功能.
CLI 范例:
salt-run fileserver.symlink_list
salt-run fileserver.symlink_list saltenv=prod
salt-run fileserver.symlink_list saltenv=dev backend=git
salt-run fileserver.symlink_list base hg,roots
salt-run fileserver.symlink_list -git
salt.runners.fileserver.
update
(backend=None)¶Update the fileserver cache. If no backend is provided, then the cache for all configured backends will be updated.
Narrow fileserver backends to a subset of the enabled ones.
在 2015.5.0 版更改: If all passed backends start with a minus sign (-
), then these
backends will be excluded from the enabled backends. However, if
there is a mix of backends with and without a minus sign (ex:
backend=-roots,git
) then the ones starting with a minus
sign will be disregarded.
Additionally, fileserver backends can now be passed as a
comma-separated list. In earlier versions, they needed to be passed
as a python list (ex: backend="['roots', 'git']"
)
CLI 范例:
salt-run fileserver.update
salt-run fileserver.update backend=roots,git