Merge branch 'borg' into 'newinfra'

Borg

See merge request nounous/ansible!152
certbot_on_virtu
_pollion 2021-01-01 19:29:56 +01:00
commit f8a299700d
6 changed files with 39 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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: