Improve emitter logic: Only run upgrade tasks if full run not needed.

If a machine's timestamp is older than the date of the last
git commit, do a full ansible run.  If the time stamp is older
than the trigger time (given as argument to 'emitter') but
younger than the latest git commit, run only the upgrade tasks.

A single outdated machine triggers the full run for all
machines in the list.
This commit is contained in:
Andreas B. Mundt 2024-02-02 19:05:34 +01:00
parent cfae3f22ed
commit 202ca25466
2 changed files with 34 additions and 14 deletions

View file

@ -74,7 +74,8 @@
roles:
- lmn_network
- up2date_debian
- role: up2date_debian
tags: upgrade
- lmn_sssd
- lmn_mount
- lmn_kde
@ -85,9 +86,10 @@
- lmn_security
tasks:
- name: Timestamp successfull ansible run
- name: Timestamp successfull run
ansible.builtin.shell: date --iso-8601=seconds >> /root/.ansible/stamps
changed_when: False
tags: upgrade
## Temporary fixes and quirks:
- name: Fix 8086:4909 external graphics card