mirror of
https://github.com/MatteZ02/infra.git
synced 2025-01-15 03:23:09 +00:00
Tasks Update: Backup - Fix backing up Minecraft server
This commit is contained in:
parent
31468b561f
commit
3efc266ffe
@ -4,15 +4,34 @@
|
||||
name: minecraft
|
||||
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/minecraft"
|
||||
follow: true
|
||||
|
||||
- name: "Backup - Minecraft - Delete"
|
||||
ansible.builtin.file:
|
||||
path: ~/data/backups/tmp/minecraft/plugins/dynmap/web/tiles
|
||||
state: absent
|
||||
|
||||
- name: "Backup - Minecraft - Save"
|
||||
community.general.archive:
|
||||
path:
|
||||
- "~/data/minecraft"
|
||||
exclude_path:
|
||||
- "~/data/minecraft/plugins/dynmap/web/tiles"
|
||||
- "~/data/backups/tmp/minecraft"
|
||||
dest: "~/data/backups/minecraft-{{ ansible_facts.date_time.date }}.zip"
|
||||
format: zip
|
||||
|
||||
- name: "Backup - Minecraft - Clean"
|
||||
ansible.builtin.file:
|
||||
path: ~/data/backups/tmp/minecraft
|
||||
state: absent
|
||||
|
||||
- name: "Backup - Minecraft - Start"
|
||||
containers.podman.podman_container:
|
||||
name: minecraft
|
||||
|
@ -17,7 +17,7 @@
|
||||
- tls
|
||||
|
||||
- name: "Deployer - Certbot - Copy Certificates"
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "~/data/certbot/live/{{ cert }}/"
|
||||
dest: "~/data/certificates/{{ cert }}/"
|
||||
follow: true
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: "Installer - Ansible - Python Library"
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name: ansible
|
||||
state: latest
|
||||
extra_args: --upgrade
|
||||
@ -10,7 +10,7 @@
|
||||
- ansible
|
||||
|
||||
- name: "Installer : Ansible : Create Folder"
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: ~/bin
|
||||
state: directory
|
||||
tags:
|
||||
@ -42,7 +42,7 @@
|
||||
- ansible
|
||||
|
||||
- name: "Installer - Ansible - Dependencies / Python Libraries"
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name: "{{ library }}"
|
||||
state: latest
|
||||
extra_args: --upgrade
|
||||
@ -62,14 +62,14 @@
|
||||
loop_var: "library"
|
||||
|
||||
- name: "Installer : Certbot : Auth Hook - Create Folder"
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: ~/data/certbot/auth-hooks
|
||||
state: directory
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- name: "Installer : Certbot : Auth Hook - Download"
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "https://git.waren.io/warengroup/acme-dns-auth/raw/branch/master/acme-dns-auth.py"
|
||||
dest: "~/data/certbot/auth-hooks/acme-dns.py"
|
||||
mode: '700'
|
||||
@ -104,7 +104,7 @@
|
||||
- certbot
|
||||
|
||||
- name: "Installer : Schedule : Maintenance"
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "Matte - Infra - Maintenance"
|
||||
hour: "*/3"
|
||||
minute: "0"
|
||||
@ -113,7 +113,7 @@
|
||||
- cron
|
||||
|
||||
- name: "Installer : Schedule : Deployer"
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "Matte - Infra - Deployer"
|
||||
minute: "*/5"
|
||||
job: "~/.venv/ansible/bin/ansible-pull -U ssh://git@github.com/MatteZ02/infra -d ~/.ansible/pull/matte/infra --accept-host-key --private-key ~/.ssh/keys/matte/infra --vault-password-file ~/.ansible/vault/matte.yml tasks.yml -t deployer"
|
||||
@ -121,7 +121,7 @@
|
||||
- cron
|
||||
|
||||
- name: "Installer : Schedule : Backup"
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "Matte - Infra - Backup"
|
||||
hour: "5"
|
||||
minute: "0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: "Installer - Ansible - Dependencies / Python Libraries"
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name: "{{ library }}"
|
||||
state: latest
|
||||
extra_args: --upgrade
|
||||
@ -20,7 +20,7 @@
|
||||
loop_var: "library"
|
||||
|
||||
- name: "Maintenance : Ansible : Update"
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name: ansible
|
||||
state: latest
|
||||
extra_args: --upgrade
|
||||
|
Loading…
Reference in New Issue
Block a user