---
- name: RClone installed
  community.general.pkgng:
    name: "rclone"
    state: latest

- name: RClone conf file installed
  template:
    src: rclone.conf.j2
    dest: /root/.config/rclone/rclone.conf
    owner: root
    mode: 0644

- name: Setting RClone to sync retroarch every 30 minutes
  cron:
    name: "Cron job to clear out tmp files every 5 minutes installed"
    minute: "30"
    job: 'rclone copy /media/var/retroarch/playlogs/ box:vrobbler/retroarch'

- name: Setting RClone to sync org every 30 minutes
  cron:
    name: "Cron job to sync org files every 15 minutes"
    minute: "15"
    job: 'rclone copy /media/var/org/ box:vrobbler/org'
