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.
28 lines
751 B
28 lines
751 B
---
|
|
|
|
- name: Create the archive dir
|
|
file: path={{ pim_root_dir }}/archives/{{ pim_current_version }} state=directory
|
|
tags: pim
|
|
|
|
- name: Archive current version
|
|
synchronize:
|
|
src: "{{ pim_root_dir }}/app"
|
|
dest: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/"
|
|
compress: False
|
|
delete: True
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
tags: pim
|
|
|
|
- name: Dump the database
|
|
mysql_db:
|
|
state: dump
|
|
name: "{{ pim_db_name }}"
|
|
target: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/{{ pim_db_name }}.sql.xz"
|
|
login_host: "{{ pim_db_server }}"
|
|
login_user: "{{ pim_db_user }}"
|
|
login_password: "{{ pim_db_pass }}"
|
|
quick: True
|
|
single_transaction: True
|
|
environment:
|
|
XZ_OPT: -T0
|
|
tags: pim
|
|
|