|
|
@ -4,6 +4,16 @@ |
|
|
|
file: path={{ mayan_root_dir }}/archives/{{ mayan_current_version }} state=directory |
|
|
|
file: path={{ mayan_root_dir }}/archives/{{ mayan_current_version }} state=directory |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Stop sevices during upgrade |
|
|
|
|
|
|
|
service: name={{ item }} state=stopped |
|
|
|
|
|
|
|
loop: |
|
|
|
|
|
|
|
- mayan-edms-web |
|
|
|
|
|
|
|
- mayan-edms-worker-fast |
|
|
|
|
|
|
|
- mayan-edms-worker-medium |
|
|
|
|
|
|
|
- mayan-edms-worker-slow |
|
|
|
|
|
|
|
- mayan-edms-beat |
|
|
|
|
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
- name: Archive previous version |
|
|
|
- name: Archive previous version |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
|
src: "{{ mayan_root_dir }}/{{ item }}" |
|
|
|
src: "{{ mayan_root_dir }}/{{ item }}" |
|
|
@ -11,8 +21,8 @@ |
|
|
|
recursive: True |
|
|
|
recursive: True |
|
|
|
delete: True |
|
|
|
delete: True |
|
|
|
loop: |
|
|
|
loop: |
|
|
|
- app |
|
|
|
|
|
|
|
- venv |
|
|
|
- venv |
|
|
|
|
|
|
|
- config |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
@ -31,12 +41,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
- name: Dump the database |
|
|
|
- name: Dump the database |
|
|
|
command: > |
|
|
|
command: > |
|
|
|
/usr/pgsql-12/bin/pg_dump |
|
|
|
/usr/pgsql-13/bin/pg_dump |
|
|
|
--clean |
|
|
|
--clean |
|
|
|
--host={{ mayan_db_server | quote }} |
|
|
|
--host={{ mayan_db_server | quote }} |
|
|
|
--port={{ mayan_db_port | quote }} |
|
|
|
--port={{ mayan_db_port | quote }} |
|
|
|
--username=sqladmin {{ mayan_db_name | quote }} |
|
|
|
--username=sqladmin {{ mayan_db_name | quote }} |
|
|
|
--file="{{ mayan_root_dir }}/archives/server_{{ mayan_server_current_version }}/{{ mayan_db_name }}.sql" |
|
|
|
--file="{{ mayan_root_dir }}/archives/{{ mayan_current_version }}/{{ mayan_db_name }}.sql" |
|
|
|
environment: |
|
|
|
environment: |
|
|
|
- PGPASSWORD: "{{ pg_admin_pass }}" |
|
|
|
- PGPASSWORD: "{{ pg_admin_pass }}" |
|
|
|
when: mayan_db_engine == 'postgresql' |
|
|
|
when: mayan_db_engine == 'postgresql' |
|
|
|