mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2023-03-17 16:00
This commit is contained in:
22
roles/offen/tasks/archive_pre.yml
Normal file
22
roles/offen/tasks/archive_pre.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Create archive directory
|
||||
file: path={{ offen_root_dir }}/archives/{{ offen_current_version }} state=directory mode=700
|
||||
tags: offen
|
||||
|
||||
- name: Archive previous version
|
||||
copy: src={{ offen_root_dir }}/bin/offen dest={{ offen_root_dir }}/archives/{{ offen_current_version }} remote_src=True
|
||||
tags: offen
|
||||
|
||||
- name: Archive the database
|
||||
mysql_db:
|
||||
state: dump
|
||||
name: "{{ offen_db_name }}"
|
||||
target: "{{ offen_root_dir }}/archives/{{ offen_current_version }}/{{ offen_db_name }}.sql.xz"
|
||||
login_host: "{{ offen_db_server | default(mysql_server) }}"
|
||||
login_user: sqladmin
|
||||
login_password: "{{ mysql_admin_pass }}"
|
||||
quick: True
|
||||
single_transaction: True
|
||||
environment:
|
||||
XZ_OPT: -T0
|
||||
tags: offen
|
Reference in New Issue
Block a user