freezer
¶
Module for freezer :maintainer: Alberto Planas <aplanas@suse.com> :maturity: new :depends: None :platform: Linux
- saltext.freezer.modules.freezer.__virtual__()[source]¶
Freezer is based on top of the pkg module.
Return True since the pkg module should always exist. This avoids the overhead of loading all modules.
- saltext.freezer.modules.freezer.status(name=None)[source]¶
Return True if there is already a frozen state.
A frozen state is merely a list of packages (including the version) in a specific time. This information can be used to compare with the current list of packages, and revert the installation of some extra packages that are in the system.
- name
Name of the frozen state. Optional.
CLI Example:
salt '*' freezer.status salt '*' freezer.status pre_install
- saltext.freezer.modules.freezer.list_()[source]¶
Return the list of frozen states.
CLI Example:
salt '*' freezer.list
- saltext.freezer.modules.freezer.freeze(name=None, force=False, **kwargs)[source]¶
Save the list of package and repos in a freeze file.
As this module is build on top of the pkg module, the user can send extra attributes to the underlying pkg module via kwargs. This function will call
pkg.list_pkgs
andpkg.list_repos
, and any additional arguments will be passed through to those functions.- name
Name of the frozen state. Optional.
- force
If true, overwrite the state. Optional.
CLI Example:
salt '*' freezer.freeze salt '*' freezer.freeze pre_install salt '*' freezer.freeze force=True root=/chroot
- saltext.freezer.modules.freezer.restore(name=None, clean=False, **kwargs)[source]¶
Make sure that the system contains the packages and repos from a frozen state.
Read the list of packages and repositories from the freeze file, and compare it with the current list of packages and repos. If there is any difference, all the missing packages are repos will be installed, and all the extra packages and repos will be removed.
As this module is build on top of the pkg module, the user can send extra attributes to the underlying pkg module via kwargs. This function will call
pkg.list_repos
,pkg.mod_repo
,pkg.list_pkgs
,pkg.install
,pkg.remove
andpkg.del_repo
, and any additional arguments will be passed through to those functions.- name
Name of the frozen state. Optional.
- clean
If True remove the frozen information YAML from the cache
Added in version 3000.
CLI Example:
salt '*' freezer.restore salt '*' freezer.restore root=/chroot
- saltext.freezer.modules.freezer.compare(old, new)[source]¶
Display the difference between two frozen states. The results are shown as as a dictionary with keys for packages and repositories. Each key may contain a changes dictionary showing items that differ between the two frozen states. Items shown in the “old” changes but not the “new” were removed. Items in “new” but not “old” were added. Items shown in both probably updated/changed versions between freezes.
- old
Name of the “old” frozen state. Required.
- new
Name of the “new” frozen state. Required.
CLI Example:
salt '*' freezer.freeze pre_install post_install