---
# It is recommended to preserve /var/tmp across reboots
- name: cron | Create empty /var/tmp/ weekly job
  copy:
    src: cron/empty-tmp
    dest: /etc/periodic/weekly/empty-tmp
    owner: root
    group: root
    mode: '755'

- name: cron | Create trimming cron jobs
  import_tasks: cron/trim.yml

- name: cron | Create scrubbing cron jobs for zfs/btrfs
  import_tasks: cron/scrub.yml

- name: cron | Install logrotate and cpulimit
  community.general.apk:
    name: logrotate, cpulimit
    state: present

- name: cron | Import tasks specific to {{ crond_provider }}
  include_tasks: 'cron/{{ crond_provider }}.yml'
