Short of using a “proper” deployment and configuration management tool such as Ansible or Salt,
debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.
The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run
debconf-get-selections (from the
debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is
<package> <debconf key> <type> <value>
# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4
Store the settings you want to preseed in a file, then run
debconf-set-selections (in the
debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:
cat preseed-file | ssh remotehost debconf-set-selections
Do this before installing the packages on the target system.