Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
1 result

Target

Select target project
  • ansible/roles/borgbackup
1 result
Select Git revision
  • main
1 result
Show changes
Commits on Source (3)
......@@ -8,6 +8,7 @@
application_remote_host: '{{ drupal.borg_host|default(false) }}'
application_remote_repo: '{{ drupal.borg_repo|default(false) }}'
application_disable_local: '{{ drupal.borg_disable_local|default(false) }}'
application_mountpoints: false
- name: Set facts without jails
set_fact:
application_dir: '/var/www{{ drupal.webRoot|default("") }}/files'
......@@ -20,6 +21,10 @@
set_fact:
application_dir: '{{ drupal.backup_root }}'
when: drupal.backup_root is defined
- name: Set facts with mountpoints
set_fact:
application_mountpoints: '{{ drupal.mountpoints }}'
when: drupal.mountpoints is defined
- name: Configure Drupal Backup
template:
......@@ -28,7 +33,6 @@
mode: 0600
notify:
- Init Borgs
when: drupal.mountpoints is not defined
- name: Add repo server host key to known hosts
known_hosts:
......
......@@ -19,6 +19,7 @@
- name: Configure
import_tasks: config.yml
when: borgbackup is defined
- name: Remember that this role had been run
set_fact:
......
location:
source_directories:
{% if application_mountpoints|default(false) %}
{% for mountpoint in application_mountpoints %}
- {{ mountpoint.path }}
{% endfor %}
{% else %}
- {{ application_dir }}
{% endif %}
repositories:
{% if not application_disable_local %}
- /var/backups/borg/{{ application }}_{{ application_id }}
......
location:
source_directories:
- /etc
{% for dir in backup_include|default([]) %}
- {{ dir }}
{% endfor %}
......@@ -7,7 +8,9 @@ location:
- /var/backups/mysql
{% endif %}
repositories:
{% if not borgbackup.disable_local|default(false) %}
- /var/backups/borg/default
{% endif %}
{% if borgbackup.remote_repo is defined %}
- {{ borgbackup.remote_repo }}
{% endif %}
......