---
- name: Pull Backup Repository
  git:
    repo: "{{ backup_repo }}"
    dest: "{{ backup_repo_dir }}"
    update: no

- name: Ensure correct file/dir ownership
  file:
    path: "{{ backup_repo_dir }}"
    recurse: True
    owner: opal
    group: opal

- name: Copy Borgmatic Cronjob
  copy:
    src: borgmatic-cron
    dest: /etc/cron.d/borgmatic
    mode: u+x
    owner: root
    group: root
