aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--action_plugins/borg_init.py11
-rw-r--r--handlers/main.yml2
-rw-r--r--tasks/client_FreeBSD.yml8
-rw-r--r--tasks/client_OpenBSD.yml2
4 files changed, 16 insertions, 7 deletions
diff --git a/action_plugins/borg_init.py b/action_plugins/borg_init.py
index 9dde218..ea07f20 100644
--- a/action_plugins/borg_init.py
+++ b/action_plugins/borg_init.py
@@ -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")
diff --git a/handlers/main.yml b/handlers/main.yml
index 9fbf697..22e2660 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,5 +1,5 @@
---
-- name: restart openbsd cron
+- name: restart bsd cron
service:
name: cron
state: restarted
diff --git a/tasks/client_FreeBSD.yml b/tasks/client_FreeBSD.yml
new file mode 100644
index 0000000..6bfc0ce
--- /dev/null
+++ b/tasks/client_FreeBSD.yml
@@ -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
+...
diff --git a/tasks/client_OpenBSD.yml b/tasks/client_OpenBSD.yml
index a566949..53e2ad1 100644
--- a/tasks/client_OpenBSD.yml
+++ b/tasks/client_OpenBSD.yml
@@ -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
...