mirror of
https://github.com/MatteZ02/infra.git
synced 2025-01-15 11:33:08 +00:00
Tasks Update: Backup
This commit is contained in:
parent
81c90a377c
commit
c5a7a0cc98
@ -4,33 +4,15 @@
|
|||||||
name: minecraft
|
name: minecraft
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Create Directory"
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: ~/data/backups/tmp
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Copy"
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: "~/data/minecraft"
|
|
||||||
dest: "~/data/backups/tmp"
|
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Delete"
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: ~/data/backups/tmp/minecraft/plugins/dynmap/web/tiles
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Save"
|
- name: "Backup - Minecraft - Save"
|
||||||
community.general.archive:
|
community.general.archive:
|
||||||
path:
|
path:
|
||||||
- "~/data/backups/tmp/minecraft"
|
- "~/data/minecraft"
|
||||||
dest: "~/data/backups/minecraft-{{ ansible_facts.date_time.date }}.zip"
|
exclusion_patterns:
|
||||||
|
- "plugins/dynmap/web/tiles/*"
|
||||||
|
dest: "~/data/backups/minecraft-{{ ansible_facts.date_time.date + '-' + ansible_facts.date_time.hour + '-' + ansible_facts.date_time.minute + '-' + ansible_facts.date_time.second }}.zip"
|
||||||
format: zip
|
format: zip
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Clean"
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: ~/data/backups/tmp/minecraft
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: "Backup - Minecraft - Start"
|
- name: "Backup - Minecraft - Start"
|
||||||
containers.podman.podman_container:
|
containers.podman.podman_container:
|
||||||
name: minecraft
|
name: minecraft
|
||||||
|
Loading…
Reference in New Issue
Block a user