feat(traefik): skip a fresh apt refresh and trim the scenario's repeated work
The prerequisites install takes only distribution packages and runs before any source is added, yet refreshed the APT cache on every run. It now passes cache_valid_time: 3600, as docker, system_baseline and user_management already do; the README tells a consumer who adds a source just before the role to refresh the cache themselves. The default scenario repeated work other steps already cover. Verify now exercises the update path once, to the other release, so prepare builds only that stand-in; the role default's stand-in was used only by the way back. mortis.kamino.ufw moves to prepare, as the ufw scenario tests it, so converge and idempotence run only traefik, with fact gathering off since none of the roles reads facts. Closes #458 Assisted-by: Claude Code
This commit is contained in:
1 parent
716baa19c7
commit
7bc3cc6bdf
7 files changed
+45
-42
No files matched your search
@@ -293,11 +293,11 @@
|
||||
traefik_ufw_key_443: "{{ ('allow|443|||||in' | hash('sha1'))[:10] }}"
|
||||
traefik_ufw_tagged: "{{ traefik_ufw_added.stdout_lines | select('match', '^ufw ') | select('search', 'ansible-ufw') | list }}"
|
||||
|
||||
# A version bump through the update path and mortis.kamino._binary_update: down to another
|
||||
# release and back to the role default, both with traefik_update, from prepare.yml's stand-ins.
|
||||
# After the idempotence step, because each run changes the binary, and before the remove path.
|
||||
# A version bump through the update path and mortis.kamino._binary_update: to another release
|
||||
# with traefik_update, from prepare.yml's stand-in. One bump covers the download, checksum check
|
||||
# and swap. After the idempotence step, because it changes the binary, and before the remove path.
|
||||
# It leaves the stand-in stub installed, so nothing after it may assert real Traefik behaviour.
|
||||
- name: Verify the update path with stand-in releases
|
||||
- name: Verify the update path with a stand-in release
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
@@ -309,13 +309,10 @@
|
||||
fail_msg: Move traefik_verify_other_version off the role default ({{ traefik_version }}).
|
||||
quiet: true
|
||||
|
||||
- name: Update to the other release, then back to the role default
|
||||
- name: Update to the other release
|
||||
ansible.builtin.include_tasks: tasks/update_and_check.yml
|
||||
loop:
|
||||
- "{{ traefik_verify_other_version }}"
|
||||
- "{{ traefik_version }}"
|
||||
loop_control:
|
||||
loop_var: traefik_verify_target
|
||||
vars:
|
||||
traefik_verify_target: "{{ traefik_verify_other_version }}"
|
||||
|
||||
# The remove path. Last on purpose: it destroys what the plays above verify, and it runs
|
||||
# once, outside the idempotence step (a converge play that changed state would fail that step).
|
||||
|
||||
Reference in new issue
Block a user