Default variable details
Some of debops.apt_preferences default variables have more extensive
configuration than simple strings or lists, here you can find documentation and
examples for them.
apt_preferences__list
List of apt_preferences(5) "pins", each pin is defined by a YAML dictionary. Supported parameters:
packageorpackagesRequired. String or YAML list of package names affected by this pin, each package separated by space. You can use a
package-*wildcard to specify multiple packages. First package name will be included in the automatically generated filename of the pin preferences file.backportsList of OS releases which should be considered when the
debops.apt_preferencesrole configures a pin for a backported package. If the current OS release is not on this list, the pin won't be created and a existing pin will be removed. This should allow for easy transition to the next OS release.versionSpecify a particular package version you want to pin, for example
5.10. It will be configured with a*at the end to allow for upgrades.By default versioned pins are set with priority
1001, which should ensure that the selected package version is never upgraded, or it will be downgraded if required.prioritySpecify a custom priority for a pin. By default pins are created with priority
500to allow for easy installation of packages from backports, versioned pins are created with priority1001.reasonA short description explaining the reason for a pin. Might be used to point the admin to useful documentation explaining why a particular pin is defined. Multi-line strings are handled properly by prepending each line by
Explanation:.filenameName of the generated file with pin preferences, saved in
/etc/apt/preferences.d/. If undefined, thedebops.apt_preferencesrole will automatically generate a filename.suffixAdditional string added at the end of the autogenerated filename, can be used to prevent filename collisions.
by_roleName of a Ansible role in the format
ROLE_OWNER.ROLE_NAMEwhich is responsible for the pin. The sanitized name will be included in the autogenerated filename.roleDeprecated. Use
by_roleinstead.pinCustom pin definition. If this variable is undefined, the
debops.apt_preferencesrole will automatically configure selected packages with preference for a backported version.rawInstead of generating a pin automatically, use contents of this YAML text block for pin configuration. Might be used to create several pins in one file.
stateOptional. If not defined or
present, an APT pin will be created. Ifabsent, pin will be deleted.whenDeprecated. If this parameter is defined and
TrueorFalse, enable or disable a particular pin conditionally.deleteDeprecated. If this parameter is defined and
True, the preferences file for this pin will be deleted and a new one will not be created.
Examples
Ensure that Perl 5.10 is installed on the system:
apt_preferences__list:
- package: 'perl'
reason: |-
Ensure that Perl 5.10 is installed on the system.
Any other Perl version breaks our legacy code!!! ;-)
(Just an example for a multiline explanation).
version: '5.10'
Prefer packages from a specific site:
apt_preferences__list:
- package: '*'
pin: 'origin "ftp.de.debian.org"'
priority: '999'
Install the nginx packages from backports on Debian Wheezy and Debian Jessie:
apt_preferences__list:
- packages: [ 'nginx', 'nginx-*' ]
backports: [ 'wheezy', 'jessie' ]