commit
f8a299700d
|
@ -1,15 +1,5 @@
|
||||||
#!/usr/bin/env ansible-playbook
|
#!/usr/bin/env ansible-playbook
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: server
|
- import_playbook: borgbackup_client.yml
|
||||||
vars:
|
- import_playbook: borgbackup_server.yml
|
||||||
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
|
|
@ -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
|
retries: 3
|
||||||
until: apt_result is succeeded
|
until: apt_result is succeeded
|
||||||
|
|
||||||
- hosts: server
|
- import_playbook: borgbackup_client.yml
|
||||||
vars:
|
|
||||||
borg: '{{ glob_borg | default({}) | combine(loc_borg | default({})) }}'
|
|
||||||
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
|
|
||||||
roles:
|
|
||||||
- borgbackup-client
|
|
||||||
|
|
||||||
- import_playbook: monitoring.yml
|
- import_playbook: monitoring.yml
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
loop:
|
loop:
|
||||||
- sources.list.d/bullseye.list
|
- sources.list.d/bullseye.list
|
||||||
- preferences.d/borgmatic-bullseye
|
- 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
|
- name: Install borgbackup
|
||||||
apt:
|
apt:
|
||||||
|
@ -25,7 +28,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0700
|
mode: 0700
|
||||||
owner: root
|
owner: root
|
||||||
|
|
||||||
- name: Deploy ssh private key
|
- name: Deploy ssh private key
|
||||||
template:
|
template:
|
||||||
src: "borgmatic/id_ed25519_borg.j2"
|
src: "borgmatic/id_ed25519_borg.j2"
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
src: "authorized_keys.j2"
|
src: "authorized_keys.j2"
|
||||||
dest: "/var/lib/borg/.ssh/authorized_keys"
|
dest: "/var/lib/borg/.ssh/authorized_keys"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
owner: borg
|
||||||
|
|
||||||
- name: Indicate role in motd
|
- name: Indicate role in motd
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Reference in New Issue