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.
46 lines
1.1 KiB
46 lines
1.1 KiB
4 years ago
|
---
|
||
|
|
||
|
- name: Create the archive dir
|
||
|
file: path={{ papermerge_root_dir }}/archives/{{ papermerge_current_version }} state=directory
|
||
|
tags: ged
|
||
|
|
||
3 years ago
|
- name: Install postgresql client
|
||
|
package:
|
||
|
name:
|
||
3 years ago
|
- postgresql14
|
||
3 years ago
|
tags: ged
|
||
|
|
||
4 years ago
|
- name: Stop sevices during upgrade
|
||
|
service: name={{ item }} state=stopped
|
||
|
loop:
|
||
|
- papermerge-web
|
||
|
- papermerge-worker
|
||
|
tags: ged
|
||
|
|
||
|
- name: Archive previous version
|
||
|
synchronize:
|
||
|
src: "{{ papermerge_root_dir }}/{{ item }}"
|
||
|
dest: "{{ papermerge_root_dir }}/archives/{{ papermerge_current_version }}/"
|
||
|
recursive: True
|
||
|
delete: True
|
||
|
loop:
|
||
|
- venv
|
||
|
- app
|
||
|
delegate_to: "{{ inventory_hostname }}"
|
||
|
tags: ged
|
||
|
|
||
|
- name: Dump the database
|
||
|
command: >
|
||
3 years ago
|
/usr/pgsql-14/bin/pg_dump
|
||
4 years ago
|
--clean
|
||
3 years ago
|
--create
|
||
4 years ago
|
--host={{ papermerge_db_server | quote }}
|
||
|
--port={{ papermerge_db_port | quote }}
|
||
|
--username=sqladmin {{ papermerge_db_name | quote }}
|
||
|
--file="{{ papermerge_root_dir }}/archives/{{ papermerge_current_version }}/{{ papermerge_db_name }}.sql"
|
||
|
environment:
|
||
|
- PGPASSWORD: "{{ pg_admin_pass }}"
|
||
|
tags: ged
|
||
|
|
||
|
|