From 54d1dd8c5195d2daba614800322250eba1ea74d4 Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Thu, 2 Oct 2025 13:23:02 +0200 Subject: [PATCH] logic corrected --- local.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/local.yml b/local.yml index 5fbc662..0e9f4e6 100644 --- a/local.yml +++ b/local.yml @@ -24,12 +24,6 @@ - (ansible_date_time.epoch | int) - (marker_file_stat.stat.mtime | int) < (ansible_reboot_cooldown_minutes | int * 60) tags: always - - name: pre-run | update marker file timestamp - file: - path: "{{ ansible_pull_marker_file }}" - state: touch - tags: always - - name: pre-run | update apt repository (debian, ubuntu, etc.) # noqa no-changed-when apt: update_cache=yes #changed_when: false @@ -167,7 +161,7 @@ # end of roles; cleanup and reporting - hosts: all become: true - tasks: + post_tasks: - name: cleanup package cache (debian and ubuntu) tags: always apt: @@ -182,6 +176,11 @@ purge: yes when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"] + - name: post-run | update marker file timestamp on successful run + file: + path: "{{ ansible_pull_marker_file }}" + state: touch + tags: always # - name: send completion alert # include_tasks: playbooks/send_completion_alert.yml # tags: always