Don't fail if cron isn't installed when setting up systemd timer (#147)

* `cron` isn't always installed and is not required when using a systemd
  timer, so make sure setup doesn't fail when we check if there's
  already an installed cron timer

Signed-off-by: Woomymy <woomy@woomy.be>
This commit is contained in:
Woomy 2024-03-07 22:11:02 +01:00 committed by GitHub
parent cbe280e7ff
commit 702299f861
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,11 +6,13 @@
state: absent
check_mode: true
register: cron_file_exists
ignore_errors: true
- name: Ensure no Borgmatic Cron file exists.
ansible.builtin.assert:
that:
- not cron_file_exists.changed
- not cron_file_exists.failed or "Failed to find" in cron_file_exists.msg
fail_msg: Found an existing Borgmatic Cron job. Please remove before using Systemd timer.
- name: Create borgbackup timer