salt.modules.freezer

Module for freezer :maintainer: Alberto Planas <aplanas@suse.com> :maturity: new :depends: None :platform: Linux

salt.modules.freezer.compare(old, new)

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
salt.modules.freezer.freeze(name=None, force=False, **kwargs)

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 and pkg.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
salt.modules.freezer.list_()

Return the list of frozen states.

CLI Example:

salt '*' freezer.list
salt.modules.freezer.restore(name=None, clean=False, **kwargs)

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 and pkg.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

New in version 3000.

CLI Example:

salt '*' freezer.restore
salt '*' freezer.restore root=/chroot
salt.modules.freezer.status(name=None)

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