mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2022-02-15 16:00
This commit is contained in:
34
roles/kimai/tasks/archive_pre.yml
Normal file
34
roles/kimai/tasks/archive_pre.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
|
||||
- name: Create the archive dir
|
||||
file: path={{ kimai_root_dir }}/archives/{{ kimai_current_version }} state=directory
|
||||
tags: kimai
|
||||
|
||||
- name: Archive current version
|
||||
synchronize:
|
||||
src: "{{ kimai_root_dir }}/app"
|
||||
dest: "{{ kimai_root_dir }}/archives/{{ kimai_current_version }}/"
|
||||
compress: False
|
||||
delete: True
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
tags: kimai
|
||||
|
||||
- name: Install mariadb client
|
||||
package:
|
||||
name:
|
||||
- mariadb
|
||||
tags: kimai
|
||||
|
||||
- name: Dump the database
|
||||
mysql_db:
|
||||
state: dump
|
||||
name: "{{ kimai_db_name }}"
|
||||
target: "{{ kimai_root_dir }}/archives/{{ kimai_current_version }}/{{ kimai_db_name }}.sql.xz"
|
||||
login_host: "{{ kimai_db_server }}"
|
||||
login_user: "{{ kimai_db_user }}"
|
||||
login_password: "{{ kimai_db_pass }}"
|
||||
quick: True
|
||||
single_transaction: True
|
||||
environment:
|
||||
XZ_OPT: -T0
|
||||
tags: kimai
|
Reference in New Issue
Block a user