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
803 B
32 lines
803 B
---
|
|
|
|
- name: Create the archive dir
|
|
file: path={{ mayan_root_dir }}/archives/{{ mayan_current_version }} state=directory
|
|
tags: mayan
|
|
|
|
- name: Archive previous version
|
|
synchronize:
|
|
src: "{{ mayan_root_dir }}/{{ item }}"
|
|
dest: "{{ mayan_root_dir }}/archives/{{ mayan_current_version }}/"
|
|
recursive: True
|
|
delete: True
|
|
loop:
|
|
- app
|
|
- venv
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
tags: mayan
|
|
|
|
- name: Dump the database
|
|
mysql_db:
|
|
state: dump
|
|
name: "{{ mayan_db_name }}"
|
|
target: "{{ root_dir }}/archives/{{ mayan_current_version }}/{{ mayan_db_name }}.sql.xz"
|
|
login_host: "{{ mayan_db_server }}"
|
|
login_user: sqladmin
|
|
login_password: "{{ mysql_admin_pass }}"
|
|
quick: True
|
|
single_transaction: True
|
|
environment:
|
|
XZ_OPT: -T0
|
|
tags: mayan
|
|
|
|
|