1
0
Fork 0

Added FreeBSD support

This commit is contained in:
Julien Dessaux 2021-06-29 18:23:26 +02:00
parent fb1bc55552
commit 6e2e7d5574
4 changed files with 16 additions and 7 deletions

View file

@ -13,11 +13,12 @@ class ActionModule(ActionBase):
### OS support #######################################################
os_package_names = {
'Alpine': 'borgbackup',
'Debian': 'borgbackup',
'Gentoo': 'app-backup/borgbackup',
'OpenBSD': 'borgbackup',
'RedHat': 'borgbackup',
'Alpine': 'borgbackup',
'Debian': 'borgbackup',
'FreeBSD': 'py38-borgbackup',
'Gentoo': 'app-backup/borgbackup',
'OpenBSD': 'borgbackup',
'RedHat': 'borgbackup',
}
if task_vars['ansible_os_family'] not in os_package_names:
error_msgs.append(f"borg role does not support {task_vars['ansible_os_family']} os family clients yet")

View file

@ -1,5 +1,5 @@
---
- name: restart openbsd cron
- name: restart bsd cron
service:
name: cron
state: restarted

8
tasks/client_FreeBSD.yml Normal file
View file

@ -0,0 +1,8 @@
---
- name: activate borg cron
lineinfile:
line: '0 23 * * * /usr/local/bin/adyxax_backup.sh'
path: /var/cron/tabs/root
create: yes
notify: restart bsd cron
...

View file

@ -3,5 +3,5 @@
lineinfile:
line: '0 23 * * * /usr/local/bin/adyxax_backup.sh'
path: /var/cron/tabs/root
notify: restart openbsd cron
notify: restart bsd cron
...