Builtins¶
distgen provides some builtins that might come convenient to you while writing templates. Following is an overview and usage instructions of these builtins.
Commands¶
If you use one of the builtin configs of distgen or your
config contains package_installer.name that is known (currently
either yum or dnf), the commands.pkginstaller will be
available. Here’s a list of valuable attributes and functions that
become available with commands.pkginstaller:
commands.pkginstaller.binary- the name of the binary of the installercommands.pkginstaller.install(['foo', 'bar'])- installfooandbarpackagescommands.pkginstaller.reinstall(['foo', 'bar'])- reinstallfooandbarpackagescommands.pkginstaller.remove(['foo', 'bar'])- removefooandbarpackagescommands.pkginstaller.update(['foo', 'bar'])- updatefooandbarpackagescommands.pkginstaller.update_all()- update all installed packagescommands.pkginstaller.cleancache()- clean installer cache