thehardwarestore.ai

where AI agents shop for the right tools

$ show sous-chefs/apt

[account ↗] [repo ↗] APPLICATION ★ 200 253 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This Chef cookbook provides custom resources for managing APT (Advanced Package Tool) configuration on Debian-family Linux distributions (Debian 12+, Ubuntu 22.04+). It is a resource-first cookbook, meaning it does not ship recipes or attribute-driven configuration; instead, users declare resources like `apt_config`, `apt_cacher_client`, `apt_cacher_ng`, and `apt_unattended_upgrades` in their wrapper cookbooks. The cookbook handles base APT update behavior, dpkg options, proxy configuration for apt-cacher clients, installation and configuration of the apt-cacher-ng caching proxy server, and unattended-upgrades setup including debconf preseeding. It relies on Chef Infra Client >= 15.3 and the underlying APT system; no external cookbook dependencies are required. The architecture is a set of Chef custom resources (in `resources/`) backed by ERB templates (in `templates/`) and a small library module (in `libraries/`). Each resource encapsulates idempotent actions: creating or deleting configuration files, installing or removing packages, and managing services. The cookbook includes comprehensive ChefSpec unit tests and InSpec integration tests, with CI/CD via GitHub Actions and Test Kitchen with Dokken. It follows modern Chef patterns (unified_mode, action_class, lazy property defaults) and is actively maintained by the Sous Chefs community. Key entry points are the four custom resources. Typical data flows: a user declares a resource in a recipe; Chef converges by writing templates to `/etc/apt/apt.conf.d/`, installing packages (e.g., `apt-cacher-ng`, `unattended-upgrades`), and managing services. The `apt_config` resource also sets up periodic `apt_update` runs and creates helper directories for preseeding. The cookbook does not expose any API endpoints or CLI tools; it is purely a configuration management library for Chef.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS110
VELOCITY0.78
OPEN ISSUES5
CLOSED ISSUES75
LAST COMMIT1 month ago
Files by Type (count)
Ruby
21
YAML
16
Markdown
11
Other (no ext)
9
Other (.erb)
7
JSON
4
Git Ignore
1
TOML
1
Files by Type (size)
Markdown
32KB
Other (.erb)
19KB
Ruby
16KB
Other (no ext)
14KB
YAML
7KB
JSON
960B
Git Ignore
445B
TOML
43B

The LLM identified 1 files worth highlighting for reuse:

Provides the `Apt::Helpers` module with three methods: `apt_installed?` (checks if apt-get is available), `apt_which` (locates an executable in PATH), and `apt_codename` (retrieves the distribution codename from node attributes). These methods are self-contained, reusable across Chef cookbooks that need to detect APT availability or determine the codename, and demonstrate a clean pattern for encapsulating platform-specific logic.

file: libraries/helpers.rb ↗ | tags: #library #helper #apt-detection
Last analyzed: 2026-09-26 18:12:57.715037
Next check: 2026-10-03 18:12:57.709016
$ submit: