My apologies if this question has been asked before, but I may not be using the correct terminology in my searches...
In my spare time I'm managing a limited amount of hosts (desktops and laptops running Debian Stretch) with Ansible. My 'installer playbook' creates a single configuration on all those hosts with different hardware to make management much easier. I'm now manually running an updater role from time to time and every once in a while I find a useful tweak that I then deploy to those hosts that are online. But: some of them rarely come to the office, and if they are available for an update, it's always a hassle to determine which tweaks I still have to deploy on that machine...
Sure, I can:
- write an epoch timestamp (
{{ ansible_date_time.epoch }}
) to a file on each host that can be retrieved and set as a fact - create a new task for each new tweak, adding a tag with the epoch timestamp and a conditional to check whether the epoch-fact > epoch-tag
- update the epoch timestamp on the host after a successful playbook run
Is this how it should be done?