0

When we use a YAML file to install packages like this below

nginx:
  pkg.installed

Is there any convenient way to cache the installing binary files used by SaltStack, and reuse them with Saltstack later? With these caches, we can ask SaltStack to precisely reproduce the installing (provisioning) process on another machine (with the same Linux distribution installed) at the binary level.

We know that there are other tools that provide this kind of binary-level reliability in different ways. For example, docker images and AWS AMIs; Nix manages packages by storing both binary packages and hash values over them.

1 Answers1

1

The pkg.installed state uses the operating system's package manager to check if the package is installed and install the package if needed. So there's nothing to cache unless your operating system's package manager provides that type of functionality.

Utah_Dave
  • 4,531
  • 24
  • 23
  • With helps from Salt minions, is that possible to let Salt master to somehow cache the packages so that the cached files can be used on other minions? I know this may require a lot of work. This is like building a [Nix](https://nixos.org/nix/)-like package management system into SaltStack. – dcodery Jul 14 '17 at 06:26
  • Salt doesn't currently do this. – Utah_Dave Jul 18 '17 at 05:58