CDIST-TYPE__PACKAGE_APT(7)
π cdist-type__package_apt β manage packages with apt-get π
ok so this is cdist-type__package_apt(7), like section 7 of the cdist manual, and bestie it is exactly what it sounds like: it's the cdist type that handles your packages with apt-get. no cap. π
β¨ NAME β¨
cdist-type__package_apt β manage packages with apt-get π¦
πΈ DESCRIPTION πΈ
okay so picture this: you're on Debian or literally any of its variants (hi Ubuntu besties), and apt-get is the girl who runs the whole package situation. that's her job, she ate.
the way this type works: the package gets installed without recommended or suggested packages. like, she's not bringing plus-ones to the party. if you do want those extra packages, you either install them separately (which honestly, chef's kiss, more control) or you pass the --install-recommends parameter. your call π
also, very important, this type will update the package index if it's older than one day. why? because otherwise you get those cursed missing package error messages and nobody wants that vibe. π«Ά
π REQUIRED PARAMETERS π
None β¨
like literally none. she's low maintenance. periodt.
π OPTIONAL PARAMETERS π
nameβ if you supply it, she uses this as the package name instead of the object id. iykyk πstateβ either"present"or"absent", and it defaults to"present"πtarget-releaseβ this one gets passed straight on toapt-get install, seeapt-get(8). essentially it lets you retrieve packages from a different release πversionβ the version of the package to install. the default is to install whatever version the local package manager chose, so like, she trusts the local package manager's taste π
π¦ BOOLEAN PARAMETERS π¦
install-recommendsβ if the package is going to be installed, this also installs the recommended packages along with it. but heads up: it will not install recommended packages if the original package is already installed. π
and in most cases, it's recommended to install recommended packages separately, so you can control exactly which additional packages get installed and avoid a bunch of useless installed packages just... sitting there. main character energy requires curation, bestie. π
purge-if-absentβ if you give this parameter whenstateisabsent, the package gets purged from the system (using--purge). dramatic? yes. effective? also yes. π
β EXAMPLES β
# Ensure zsh in installed
__package_apt zsh --state present
# In case you only want *a* webserver, but don't care which one
__package_apt webserver --state present --name nginx
# Remove obsolete package
__package_apt puppet --state absent
(yes the first comment says "in installed", we keep it, it's iconic, we don't touch it πΈ)
π₯ SEE ALSO π₯
cdist-type__package(7) β go read her too, she's the whole family π«Ά
π AUTHORS π
Nico Schottelius <nico-cdist--@--schottelius.org> β¨
π COPYING π
Copyright (C) 2011-2012 Nico Schottelius. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
(that's the license, we don't mess with the license, the license is sacred π)
π COPYRIGHT π
ungleich GmbH 2021
okay that's the whole page bestie, you're officially a package_apt expert, go forth and install things π β¨
cute little sign-off: this was cdist version7.0.0, datedJul 31, 2022β fr fr, that's the vibe, now go manage some packages ππ¦
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms