minecraft/aws-s3-backup/tasks/main.yaml
changeset 156 ebd8a21a0e62
parent 56 59e94b4a91a2
child 158 1b7ccb729164
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minecraft/aws-s3-backup/tasks/main.yaml	Sat Jul 03 13:23:46 2021 -0500
@@ -0,0 +1,19 @@
+---
+
+- 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"