Support for DEB packages
salt.modules.dpkg.
bin_pkg_info
(path, saltenv='base')¶2015.8.0 新版功能.
Parses RPM metadata and returns a dictionary of information about the package (name, version, etc.).
salt://path/to/file.rpm
).
If a salt fileserver URL is passed, the file will be cached to the
minion so that it can be examined.path
is a local file path on the minion.CLI 范例:
salt '*' lowpkg.bin_pkg_info /root/foo-1.2.3-1ubuntu1_all.deb
salt '*' lowpkg.bin_pkg_info salt://foo-1.2.3-1ubuntu1_all.deb
salt.modules.dpkg.
file_dict
(*packages)¶List the files that belong to a package, grouped by package. Not specifying any packages will return a list of _every_ file on the system's package database (not generally recommended).
CLI范例:
salt '*' lowpkg.file_list httpd
salt '*' lowpkg.file_list httpd postfix
salt '*' lowpkg.file_list
salt.modules.dpkg.
file_list
(*packages)¶List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's package database (not generally recommended).
CLI范例:
salt '*' lowpkg.file_list httpd
salt '*' lowpkg.file_list httpd postfix
salt '*' lowpkg.file_list
salt.modules.dpkg.
info
(*packages)¶Returns a detailed summary of package information for provided package names. If no packages are specified, all packages will be returned.
2015.8.1 新版功能.
CLI example:
salt '*' lowpkg.info
salt '*' lowpkg.info apache2 bash
salt.modules.dpkg.
list_pkgs
(*packages)¶List the packages currently installed in a dict:
{'<package_name>': '<version>'}
External dependencies:
Virtual package resolution requires aptitude. Because this function
uses dpkg, virtual packages will be reported as not installed.
CLI 范例:
salt '*' lowpkg.list_pkgs
salt '*' lowpkg.list_pkgs httpd
salt.modules.dpkg.
unpurge
(*packages)¶Change package selection for each package specified to 'install'
CLI 范例:
salt '*' lowpkg.unpurge curl