minecraft/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 06 Nov 2022 22:03:27 -0600
changeset 202 252069788104
parent 164 ae19501f5251
permissions -rw-r--r--
Backed out changeset 10051617d075
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
156
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
     3
- name: create minecraft s3 backup shell script
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  copy:
156
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
     6
    src: "minecraft-s3-backup.sh"
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
     7
    dest: "/usr/local/bin/minecraft-s3-backup.sh"
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    mode: "0755"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
158
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    10
- name: create s3 backup lifesycle json file
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    11
  become: yes
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    12
  copy:
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    13
    src: "minecraft-s3-backup-lifecycle.json"
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    14
    dest: "/usr/local/share/minecraft-s3-backup-lifecycle.json"
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    15
    mode: "0755"
1b7ccb729164 Updated minecraft backup for lifecycles.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
    16
164
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    17
- name: create minecraft tar dir
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    18
  become: yes
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    19
  file:
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    20
    path: "{{minecraft_s3_backup_tar_dir}}"
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    21
    mode: "0755"
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    22
    state: "directory"
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    23
156
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    24
- name: configure minecraft s3 backup systemd service
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
  template:
156
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    27
    src: "[email protected]"
164
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    28
    dest: "/lib/systemd/system/minecraft-s3-backup@{{minecraft_s3_backup_world_name}}.service"
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
  notify: reload s3 backup service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
156
ebd8a21a0e62 Added minecraft backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    31
- name: ensure minecraft s3 backup service is started
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
  become: yes
164
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 158
diff changeset
    33
  systemd: name="minecraft-s3-backup@{{minecraft_s3_backup_world_name}}.service" enabled="yes"