jepsen.os.debian
Common tasks for Debian boxes.
add-repo!
(add-repo! repo-name apt-line)
(add-repo! repo-name apt-line keyserver key)
Adds an apt repo (and optionally a key from the given keyserver).
install
(install pkgs)
(install pkgs apt-opts)
Ensure the given packages are installed. Can take a flat collection of packages, passed as symbols, strings, or keywords, or, alternatively, a map of packages to version strings. Can optionally take a collection of additional CLI options to be passed to apt-get.
installed
(installed pkgs)
Given a list of debian packages (strings, symbols, keywords, etc), returns the set of packages which are installed, as strings.
installed-version
(installed-version pkg)
Given a package name, determines the installed version of that package, or nil if it is not installed.
installed?
(installed? pkg-or-pkgs)
Are the given debian packages, or singular package, installed on the current system?
setup-hostfile!
(setup-hostfile!)
Makes sure the hostfile has a loopback entry for the local hostname
time-since-last-update
(time-since-last-update)
When did we last run an apt-get update, in seconds ago