title: Ansible: run task at most once every n hours
body: <p>I have an Ansible task which renews a LetsEncrypt certificate. I only want this task to run once a week, in order to avoid getting blocked for hammering the API, but the rest of the playbook needs to run daily — and will be run <em>way</em> more than that during development.</p>
  <p>Is it possible to rate-limit an Ansible task so it will be skipped if it has already been run in the last <em>n</em> hours?</p>
  <p>The best way I can think of is to touch a file if the task was run, and skip the task if the file exists and is newer than a certain timestamp — but Ansible doesn't seem to be big on date and time calculations. It also makes the playbook pretty chunky.</p>
  <p>I did think of applying a tag to the task and marking the tag as skipped by default in <code>ansible.cfg</code>, then only running with that tag enabled once a week, but <code>ansible.cfg</code> seems to override <code>--tags</code> rather than the other way around.</p>