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
23 lines
541 B
YAML
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
|