39 lines
944 B
YAML
39 lines
944 B
YAML
|
---
|
||
|
|
||
|
- name: Create the archive dir
|
||
|
file: path={{ taiga_root_dir }}/archives/{{ taiga_current_version }} state=directory
|
||
|
tags: taiga
|
||
|
|
||
|
- name: Install postgresql client
|
||
|
package:
|
||
|
name:
|
||
|
- postgresql14
|
||
|
tags: taiga
|
||
|
|
||
|
- name: Archive previous version
|
||
|
synchronize:
|
||
|
src: "{{ taiga_root_dir }}/{{ item }}"
|
||
|
dest: "{{ taiga_root_dir }}/archives/{{ taiga_current_version }}/"
|
||
|
recursive: True
|
||
|
delete: True
|
||
|
compress: False
|
||
|
loop:
|
||
|
- venv
|
||
|
- app
|
||
|
delegate_to: "{{ inventory_hostname }}"
|
||
|
tags: taiga
|
||
|
|
||
|
- name: Dump the database
|
||
|
command: >
|
||
|
/usr/pgsql-14/bin/pg_dump
|
||
|
--clean
|
||
|
--create
|
||
|
--host={{ taiga_db_server | quote }}
|
||
|
--port={{ taiga_db_port | quote }}
|
||
|
--username={{ taiga_db_user | quote }} {{ taiga_db_name | quote }}
|
||
|
--file="{{ taiga_root_dir }}/archives/{{ taiga_current_version }}/{{ taiga_db_name }}.sql"
|
||
|
environment:
|
||
|
- PGPASSWORD: "{{ taiga_db_pass }}"
|
||
|
tags: taiga
|
||
|
|