You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
845 B
32 lines
845 B
4 years ago
|
---
|
||
|
|
||
|
- name: Create archive dir
|
||
|
file: path={{ funkwhale_root_dir }}/archives/{{ funkwhale_current_version }} state=directory
|
||
|
tags: funkwhale
|
||
|
|
||
|
- name: Archive previous version
|
||
|
synchronize:
|
||
|
src: "{{ funkwhale_root_dir }}/{{ item }}"
|
||
|
dest: "{{ funkwhale_root_dir }}/archives/{{ funkwhale_current_version }}/"
|
||
|
recursive: True
|
||
|
delete: True
|
||
|
loop:
|
||
|
- api
|
||
|
- front
|
||
|
- venv
|
||
|
delegate_to: "{{ inventory_hostname }}"
|
||
|
tags: funkwhale
|
||
|
|
||
|
- name: Archive a database dump
|
||
|
command: >
|
||
|
/usr/pgsql-12/bin/pg_dump
|
||
|
--clean
|
||
|
--host={{ funkwhale_db_server }}
|
||
|
--port={{ funkwhale_db_port }}
|
||
|
--username=sqladmin {{ funkwhale_db_name }}
|
||
|
--file={{ funkwhale_root_dir }}/archives/{{ funkwhale_current_version }}/{{ funkwhale_db_name }}.sql
|
||
|
environment:
|
||
|
- PGPASSWORD: "{{ pg_admin_pass }}"
|
||
|
tags: funkwhale
|
||
|
|