mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 08:36:55 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
31
roles/bookstack/tasks/archive_pre.yml
Normal file
31
roles/bookstack/tasks/archive_pre.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
|
||||
- name: Create the archive dir
|
||||
file: path={{ bookstack_root_dir }}/archives/{{ bookstack_current_version }} state=directory
|
||||
tags: bookstack
|
||||
|
||||
- name: Archive current version
|
||||
synchronize:
|
||||
src: "{{ bookstack_root_dir }}/app"
|
||||
dest: "{{ bookstack_root_dir }}/archives/{{ bookstack_current_version }}/"
|
||||
compress: False
|
||||
delete: True
|
||||
rsync_opts:
|
||||
- '--exclude=/storage/'
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
tags: bookstack
|
||||
|
||||
- name: Dump the database
|
||||
mysql_db:
|
||||
state: dump
|
||||
name: "{{ bookstack_db_name }}"
|
||||
target: "{{ bookstack_root_dir }}/archives/{{ bookstack_current_version }}/{{ bookstack_db_name }}.sql.xz"
|
||||
login_host: "{{ bookstack_db_server }}"
|
||||
login_user: "{{ bookstack_db_user }}"
|
||||
login_password: "{{ bookstack_db_pass }}"
|
||||
quick: True
|
||||
single_transaction: True
|
||||
environment:
|
||||
XZ_OPT: -T0
|
||||
tags: bookstack
|
||||
|
Reference in New Issue
Block a user