Compare commits

..

No commits in common. "master" and "feat/koha" have entirely different histories.

7 changed files with 11 additions and 85 deletions

View file

@ -1,19 +1,9 @@
---
- name: Mastodon backup
## FRONTEND
- name: Test backup
hosts: mastodon
roles: ['stable/restic']
vars:
restic_dump_compression_enabled: true
restic_databases:
- {name: 'mastodon', dump_command: sudo -Hiu postgres pg_dump -Z0 -Fc mastodon}
restic_folders: ['/var/lib/redis/dump.rdb','/home/mastodon/live/.env.production']
- name: Stereodon Backup
hosts: stereodon
roles: ['stable/restic']
vars:
restic_dump_compression_enabled: true
restic_databases:
- {name: 'stereodon', dump_command: sudo -Hiu postgres pg_dump -Z0 -Fc mastodon}
restic_folders: ['/var/lib/redis/dump.rdb','/home/mastodon/live/.env.production']
- {name: 'mastodon', dump_command: sudo -Hiu postgres pg_dump -Fc mastodon}
restic_folders: ['/var/lib/redis/dump.rdb','/home/mastodon/live/.env.production']

View file

@ -1,7 +0,0 @@
---
## FRONTEND
- name: Frontend
hosts: frontend2
roles: ['stable/common', 'stable/nginx']
vars_files: vars/frontend.yml
tags: frontend

View file

@ -1,7 +1,7 @@
---
## FRONTEND
- name: Frontend
hosts: frontend2
hosts: frontend
roles: ['stable/common', 'stable/nginx']
vars_files: vars/frontend.yml
tags: frontend

View file

@ -13,18 +13,12 @@ cicles:
mastodon:
hosts: cisti.mastodon
stereodon:
hosts: cisti.stereodon
farma:
hosts: cisti.farma
frontend:
hosts: cisti.frontend
frontend2:
hosts: cisti.frontend2
radicale:
hosts: cisti.cal

View file

@ -17,7 +17,7 @@
- name: Generate certificate if needed
become: yes
command: /snap/bin/certbot --nginx --non-interactive --agree-tos --expand
command: /snap/bin/certbot --nginx --non-interactive --agree-tos
--domains {{ fpm_services | items2dict(key_name='server_name', value_name='server_name') | join(',') }}
{{ reverse_services | items2dict(key_name='server_name', value_name='server_name') | join(',') }}
--email {{certbot_email}}

View file

@ -7,10 +7,6 @@ User={{ restic_user }}
CPUQuota={{ 25 * ansible_processor_vcpus }}%
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7
{% if restic_ssh_enabled %}
Environment="RESTIC_REPOSITORY=sftp:{{ restic_ssh_host }}:{{ restic_repository_name }}"
{% else %}
@ -32,7 +28,7 @@ ExecStart={{ restic_path }} backup --verbose {{ folder }}
{% endfor -%}
{% for database in restic_databases %}
ExecStart=/bin/sh -c "{{ database.dump_command }} {{ '| pigz --rsyncable |' if restic_dump_compression_enabled else '|' }} {{ restic_path }} backup --verbose --stdin --stdin-filename {{ database.name }}{{ '.sql.gz' if restic_dump_compression_enabled else '.sql' }}"
ExecStart=/bin/sh -c "{{ database.dump_command }} {{ '| pigz |' if restic_dump_compression_enabled else '|' }} {{ restic_path }} backup --verbose --stdin --stdin-filename {{ database.name }}{{ '.sql.gz' if restic_dump_compression_enabled else '.sql' }}"
{% endfor -%}
{% if restic_forget %}

View file

@ -1,57 +1,10 @@
---
with_certbot: true
certbot_email: info@cisti.org
reverse_services:
- pad:
server_name: pad.cisti.org
proxy_pass: http://192.168.200.12:8001
- gancio:
server_name: gancio.cisti.org
proxy_pass: http://192.168.200.14:13120
custom_config: |
sendfile on;
client_max_body_size 10m;
- mastodon:
server_name: mastodon.cisti.org
proxy_pass: http://192.168.200.13:80
custom_config: |
sendfile on;
client_max_body_size 10m;
- stereodon:
server_name: stereodon.social
proxy_pass: http://192.168.200.18:80
custom_config: |
sendfile on;
client_max_body_size 10m;
servers:
- cicles:
server_name: cicles.cisti.org
proxy_pass: http://192.168.200.15:8080
server_name: antani.cisti.org
proxy_pass: http://localhost:8001
custom_config: |
sendfile on;
client_max_body_size 1000m;
## WEB STATICO
- cisti:
server_name: cisti.org
proxy_pass: http://192.168.200.10
- facciamo:
server_name: facciamo.cisti.org
proxy_pass: http://192.168.200.10
- farma:
server_name: farma.cisti.org
proxy_pass: http://192.168.200.10
- hackrocchio:
server_name: hackrocchio.org
proxy_pass: http://192.168.200.10
- autogestione:
server_name: autogestione.social
proxy_pass: http://192.168.200.10
client_max_body_size 500m;