minecraft/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 03 Jul 2021 13:23:46 -0500
changeset 156 ebd8a21a0e62
parent 56 mercurial/aws-s3-backup/tasks/main.yaml@59e94b4a91a2
child 158 1b7ccb729164
permissions -rw-r--r--
Added minecraft backup.

---

- 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: 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"