This cookbook is resource-first. It provides custom resources for base APT configuration, apt-cacher client and server management, and unattended-upgrades configuration on Debian-family systems. It does not ship recipe entrypoints or attribute-driven configuration.
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
- Debian 12+
- Ubuntu 22.04+
May work with or without modification on other Debian derivatives.
- Chef 15.3+
- None
Declare apt_config early in the run so APT metadata and common configuration are in place before package resources that depend on them.
apt_config 'default'To force the initial update during compile phase, use the common compile_time property on the resource:
apt_config 'compile-time' do
periodic_update_min_delay 0
compile_time_update true
compile_time true
endapt_cacher_client 'default' do
cacher_server(
host: 'cache.example.com',
port: 3142,
proxy_ssl: true,
cache_bypass: {
'download.oracle.com' => 'https',
'nginx.org' => 'https',
}
)
endapt_cacher_ng 'default' do
cacher_dir '/var/cache/apt-cacher-ng'
cacher_port 3142
cacher_interface '0.0.0.0'
endapt_unattended_upgrades 'default' do
enable true
allowed_origins []
origins_patterns ['origin=Debian,label=Debian-Security']
dpkg_options ['--force-confold']
endThe apt_preference resource has been moved into chef-client in Chef 13.3.
See https://docs.chef.io/resource_apt_preference.html for usage details
The apt_repository resource has been moved into chef-client in Chef 12.9.
See https://docs.chef.io/resource_apt_repository.html for usage details
The apt_update resource has been moved into chef-client in Chef 12.7.
See https://docs.chef.io/resource_apt_update.html for usage details
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.