Missing c flag in cronjob
Closed this issue · 1 comments
Genygo commented
If i set borgmatic_config_name
and borgmatic_large_repo
to false the cronjob is missing the -c flag for the specific config file.
- name: Add cron-job for borgmatic (normal-sized repo)
block:
- name: Add cron job for create, check and prune
cron:
name: "{{ borgmatic_cron_name }}"
hour: "{{ borgmatic_cron_hour }}"
minute: "{{ borgmatic_cron_minute }}"
user: "root"
cron_file: "{{ borgmatic_cron_name }}"
job: "/usr/local/bin/borgmatic"
- name: Ensure separate check cron job is absent
cron:
name: "{{ borgmatic_cron_name }}-check"
state: absent
when: not borgmatic_large_repo
m3nu commented
Setting borgmatic_config_name
doesn't make much sense and defaults to config.yaml
.
But I agree that the normal sized-case doesn't honor the borgmatic_config_name
setting, which is an issue.
Here a PR for this. Let me know if this resolves the issue for your use case.