minecraft/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 10 Jul 2021 13:28:05 -0500
changeset 161 edc41ae39fb8
parent 158 1b7ccb729164
child 164 ae19501f5251
permissions -rw-r--r--
Upgraded minecraft to 1.17.1

---

- name: create minecraft s3 backup shell script
  become: yes
  copy:
    src: "minecraft-s3-backup.sh"
    dest: "/usr/local/bin/minecraft-s3-backup.sh"
    mode: "0755"

- name: create s3 backup lifesycle json file
  become: yes
  copy:
    src: "minecraft-s3-backup-lifecycle.json"
    dest: "/usr/local/share/minecraft-s3-backup-lifecycle.json"
    mode: "0755"

- name: configure minecraft s3 backup systemd service
  become: yes
  template:
    src: "[email protected]"
    dest: "/lib/systemd/system/minecraft-s3-backup@{{minecraft_s3_backup_bucket}}.service"
  notify: reload s3 backup service

- name: ensure minecraft s3 backup service is started
  become: yes
  systemd: name="minecraft-s3-backup@{{minecraft_s3_backup_bucket}}.service" enabled="yes"