Service support for the REST example

salt.modules.rest_package.install(name=None, refresh=False, fromrepo=None, pkgs=None, sources=None, **kwargs)
salt.modules.rest_package.installed(name, version=None, refresh=False, fromrepo=None, skip_verify=False, pkgs=None, sources=None, **kwargs)
salt.modules.rest_package.list_pkgs(versions_as_list=False, **kwargs)
salt.modules.rest_package.remove(name=None, pkgs=None, **kwargs)
salt.modules.rest_package.version(*names, **kwargs)

Returns a string representing the package version or an empty string if not installed. If more than one package name is specified, a dict of name/version pairs is returned.

CLI 范例:

salt '*' pkg.version <package name>
salt '*' pkg.version <package1> <package2> <package3> ...