131. Standardized Essential Packages
Status: Accepted Date: 2025-07-06
Context
When provisioning new servers, we want to ensure that a common baseline of essential command-line utilities and development tools is always available, regardless of the server's ultimate purpose. This consistency makes it easier for developers to work on any machine in the fleet, as they can rely on their familiar tools (like htop, tmux, vim, curl) being present.
Manually installing these packages on every new server would be tedious and error-prone.
Decision
The 01_common Ansible role will be responsible for defining and installing a standardized list of essential packages on every server managed by Ansible.
This list is defined as a variable within the role and includes over 40 packages, falling into several categories:
- System Utilities:
htop,tmux,tree,ncdu, etc. - Network Tools:
curl,wget,net-tools. - Development Tools:
git,build-essential,pkg-config,libssl-dev. - Text Editors:
vim.
The role will use the apt module to ensure all packages in this list are present on the target system. This task runs at the very beginning of the provisioning process, establishing the baseline environment that all subsequent roles depend on.
Consequences
Positive:
- Consistency: Guarantees that every server in our infrastructure has the same foundational toolset. This reduces friction for developers and makes automation in later roles more reliable.
- Centralized Management: The list of essential packages is defined in one central place (
roles/01_common/vars/main.yml), making it easy to add or remove packages from the baseline. - Idempotent: The use of the
aptmodule ensures the task is idempotent. It will only install missing packages, and it can be re-run safely at any time to enforce the desired state.
Negative:
- Bloat on Minimalist Servers: Some servers might not strictly need every single package in the essential list. For a minimalist, single-purpose appliance, this could be seen as unnecessary bloat.
- Slightly Slower Provisioning: Installing this many packages takes time during the initial server provisioning.
Mitigation:
- Common Denominator: The list is curated to be a "sensible common denominator". The packages are all relatively small, and the benefit of having a consistent, user-friendly environment on all machines far outweighs the minor disk space usage.
- One-Time Cost: The installation time is a small, one-time cost during the initial provisioning. The subsequent time saved by having a consistent environment is a much larger benefit. For servers that truly need to be minimalist, we can use a different, more stripped-down playbook that omits the
01_commonrole, but this would be the exception, not the rule.