Ansible role to configure APT repositories and settings.
Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.
- Requirements
- Default Variables
- apt_enable_backports
- apt_enable_general
- apt_enable_multiverse
- apt_enable_universe
- apt_force_update
- apt_general_url
- apt_periodic_config
- apt_periodic_config_enabled
- apt_redundant_configs
- apt_security_url
- apt_unattended_config_enabled
- apt_unattended_upgrade_allowed_origins
- apt_unattended_upgrade_dev_release
- apt_unattended_upgrade_download_limit
- apt_unattended_upgrade_mail_on_error_only
- apt_unattended_upgrade_mail_to
- apt_unattended_upgrade_package_blacklist
- apt_unattended_upgrade_remove_unused_deps
- apt_unattended_upgrade_remove_unused_kernel
- apt_unattended_upgrade_syslog_enabled
- apt_unattended_upgrade_syslog_facility
- Discovered Tags
- Dependencies
- License
- Author
- Minimum Ansible version:
2.10
Enable backports repositories
apt_enable_backports: true
Enable general repositories
apt_enable_general: true
Enable multiverse repositories
apt_enable_multiverse: true
Enable universe repositories
apt_enable_universe: true
Force apt cache update
apt_force_update: false
General URL of repositories changed by architecture
apt_general_url:
x86_64: http://archive.ubuntu.com/ubuntu
aarch64: http://ports.ubuntu.com/ubuntu-ports
Set apt options for daily tasks
apt_periodic_config:
- name: Update-Package-Lists
value: 1
- name: Download-Upgradeable-Packages
value: 0
- name: AutocleanInterval
value: 1
- name: Unattended-Upgrade
value: 0
Enable writing periodic config
apt_periodic_config_enabled: true
List of redundant configs that gets deleted
apt_redundant_configs:
- 20auto-upgrades
Security URL of repositories changed by architecture
apt_security_url:
x86_64: http://security.ubuntu.com/ubuntu
aarch64: http://ports.ubuntu.com/ubuntu-ports
Enable writing unattended config
apt_unattended_config_enabled: true
Automatically upgrade packages from these pairs
apt_unattended_upgrade_allowed_origins:
- ${distro_id}:${distro_codename}
- ${distro_id}:${distro_codename}-security
- ${distro_id}ESM:${distro_codename}
Automatically upgrade Ubuntu development releases
apt_unattended_upgrade_dev_release: false
Use apt bandwidth limit feature, limits the download speed
apt_unattended_upgrade_download_limit:
apt_unattended_upgrade_download_limit: '70'
Send emails only if an unattended upgrade fails
apt_unattended_upgrade_mail_on_error_only: true
Send email to this address for problems or packages upgrades
apt_unattended_upgrade_mail_to: root
apt_unattended_upgrade_mail_to: user@example.com
List of packages to not update
apt_unattended_upgrade_package_blacklist: []
apt_unattended_upgrade_package_blacklist:
- nvim
- nginx
Do automatic removal of new unused dependencies after the upgrade
apt_unattended_upgrade_remove_unused_deps: true
Remove unused installed kernel-related packages automatically
apt_unattended_upgrade_remove_unused_kernel: false
apt_unattended_upgrade_syslog_enabled: true
Specify syslog facility
apt_unattended_upgrade_syslog_facility: daemon
apt
- None
Apache-2.0