Getting started
APT preferences configuration
You can use this role to select a different version of APT packages available without specifying the version directly in the playbooks or roles. This helps to ensure that the APT dependency tree is stable and there are no conflicts between different versions.
Example inventory
The debops.apt_preferences
role is included in the common.yml
playbook, you
can add your own entries to Ansible’s inventory and they should be picked up
automatically on the next playbook run.
Example playbook
Here's an example playbook that can be used to manage APT preferences:
---
- name: Manage APT preferences
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_all_hosts', 'debops_service_apt_preferences' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: apt_preferences
tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]