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