Files
Kamino/roles/system_baseline/tasks/packages.yml
Defame1297 0973f39831
Build / build (pull_request) Successful in 29s
Lint / lint (pull_request) Successful in 2m18s
Molecule / molecule (pull_request) Canceled after 26m49s
feat: refresh the APT cache on distribution-only installs when stale
The docker prerequisites and the system_baseline packages install only
from the distribution's sources, yet refreshed the APT cache on every
run. They now pass cache_valid_time: 3600, as the system_baseline update
task and user_management already do.

The docker and tailscale installs from the role's own APT source keep
refreshing on every run, so a run that wrote the source line but failed
to fetch its lists heals on the next run. The update entry points are
unchanged.

The system_baseline README tells a consumer who adds a source just
before the role to refresh the cache themselves.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-27 15:10:32 +00:00

23 lines
541 B
YAML

---
- name: Install essential packages
ansible.builtin.package:
name: "{{ __system_baseline_install_packages }}"
state: present
update_cache: true
cache_valid_time: 3600
become: true
- name: Gather installed packages
ansible.builtin.package_facts:
manager: auto
become: true
- name: Remove unnecessary packages if installed
ansible.builtin.package:
name: "{{ item }}"
state: absent
purge: true
loop: "{{ __system_baseline_purge_packages }}"
when: item in ansible_facts.packages
become: true