commit
f8a299700d
|
@ -1,15 +1,5 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
|
||||
- hosts: server
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-client
|
||||
|
||||
- hosts: backups
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-server
|
||||
- import_playbook: borgbackup_client.yml
|
||||
- import_playbook: borgbackup_server.yml
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
|
||||
- hosts: server
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-client
|
||||
|
||||
- hosts: backups
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-server
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
|
||||
- hosts: server
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-client
|
||||
|
||||
- hosts: backups
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-server
|
|
@ -84,11 +84,5 @@
|
|||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- hosts: server
|
||||
vars:
|
||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
||||
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
|
||||
roles:
|
||||
- borgbackup-client
|
||||
|
||||
- import_playbook: borgbackup_client.yml
|
||||
- import_playbook: monitoring.yml
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
loop:
|
||||
- sources.list.d/bullseye.list
|
||||
- preferences.d/borgmatic-bullseye
|
||||
when: ansible_lsb.release | int <= 10
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version | int <= 10
|
||||
- ansible_distribution_release != "bullseye"
|
||||
|
||||
- name: Install borgbackup
|
||||
apt:
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
src: "authorized_keys.j2"
|
||||
dest: "/var/lib/borg/.ssh/authorized_keys"
|
||||
mode: 0600
|
||||
owner: borg
|
||||
|
||||
- name: Indicate role in motd
|
||||
template:
|
||||
|
|
Loading…
Reference in New Issue