2024-12-21 03:38:50 +00:00
|
|
|
---
|
|
|
|
- name: "Backup - Minecraft - Stop"
|
|
|
|
containers.podman.podman_container:
|
|
|
|
name: minecraft
|
|
|
|
state: stopped
|
|
|
|
|
2024-12-23 01:43:27 +00:00
|
|
|
- name: "Backup - Minecraft - Create Directory"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: ~/data/backups/tmp
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: "Backup - Minecraft - Copy"
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "~/data/minecraft"
|
2024-12-23 13:05:11 +00:00
|
|
|
dest: "~/data/backups/tmp"
|
2024-12-23 01:43:27 +00:00
|
|
|
|
|
|
|
- name: "Backup - Minecraft - Delete"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: ~/data/backups/tmp/minecraft/plugins/dynmap/web/tiles
|
|
|
|
state: absent
|
|
|
|
|
2024-12-21 03:38:50 +00:00
|
|
|
- name: "Backup - Minecraft - Save"
|
|
|
|
community.general.archive:
|
|
|
|
path:
|
2024-12-23 01:43:27 +00:00
|
|
|
- "~/data/backups/tmp/minecraft"
|
2024-12-21 03:38:50 +00:00
|
|
|
dest: "~/data/backups/minecraft-{{ ansible_facts.date_time.date }}.zip"
|
|
|
|
format: zip
|
|
|
|
|
2024-12-23 01:43:27 +00:00
|
|
|
- name: "Backup - Minecraft - Clean"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: ~/data/backups/tmp/minecraft
|
|
|
|
state: absent
|
|
|
|
|
2024-12-21 03:38:50 +00:00
|
|
|
- name: "Backup - Minecraft - Start"
|
|
|
|
containers.podman.podman_container:
|
|
|
|
name: minecraft
|
|
|
|
state: started
|