The molecule images keep no APT lists, and the ufw and fail2ban scenarios, and the gitea scenario's remove path, relied on those packages being baked in. Their prepare now refreshes the cache, so they keep working once the images stop shipping the packages. Refs: #435 Assisted-by: Claude Code
20 lines
597 B
YAML
20 lines
597 B
YAML
---
|
|
# The image keeps no APT lists, and --check does not refresh them, so the fresh-host check needs
|
|
# them to preview the fail2ban install. The log file a service jail watches must exist, or
|
|
# `fail2ban-client -t` fails.
|
|
- name: Prepare
|
|
hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Refresh the APT cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
|
|
- name: Create the log file the logpath jail watches
|
|
ansible.builtin.file:
|
|
path: /var/log/svc-a.log
|
|
state: touch
|
|
mode: "0644"
|
|
access_time: preserve
|
|
modification_time: preserve
|