Added FreeBSD support
This commit is contained in:
parent
fb1bc55552
commit
6e2e7d5574
4 changed files with 16 additions and 7 deletions
|
@ -13,11 +13,12 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
### OS support #######################################################
|
### OS support #######################################################
|
||||||
os_package_names = {
|
os_package_names = {
|
||||||
'Alpine': 'borgbackup',
|
'Alpine': 'borgbackup',
|
||||||
'Debian': 'borgbackup',
|
'Debian': 'borgbackup',
|
||||||
'Gentoo': 'app-backup/borgbackup',
|
'FreeBSD': 'py38-borgbackup',
|
||||||
'OpenBSD': 'borgbackup',
|
'Gentoo': 'app-backup/borgbackup',
|
||||||
'RedHat': 'borgbackup',
|
'OpenBSD': 'borgbackup',
|
||||||
|
'RedHat': 'borgbackup',
|
||||||
}
|
}
|
||||||
if task_vars['ansible_os_family'] not in os_package_names:
|
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")
|
error_msgs.append(f"borg role does not support {task_vars['ansible_os_family']} os family clients yet")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: restart openbsd cron
|
- name: restart bsd cron
|
||||||
service:
|
service:
|
||||||
name: cron
|
name: cron
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
8
tasks/client_FreeBSD.yml
Normal file
8
tasks/client_FreeBSD.yml
Normal 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
|
||||||
|
...
|
|
@ -3,5 +3,5 @@
|
||||||
lineinfile:
|
lineinfile:
|
||||||
line: '0 23 * * * /usr/local/bin/adyxax_backup.sh'
|
line: '0 23 * * * /usr/local/bin/adyxax_backup.sh'
|
||||||
path: /var/cron/tabs/root
|
path: /var/cron/tabs/root
|
||||||
notify: restart openbsd cron
|
notify: restart bsd cron
|
||||||
...
|
...
|
||||||
|
|
Reference in a new issue