Split backup playbook into client and server

certbot_on_virtu
_pollion 2021-01-01 19:08:29 +01:00
parent 8f65faa638
commit 73440ec9af
4 changed files with 33 additions and 19 deletions

View File

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

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