dendrite/aws-s3-backup/tasks/main.yaml
changeset 163 40b78af86337
parent 159 05d0cf32e077
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dendrite/aws-s3-backup/tasks/main.yaml	Sun Jul 18 17:43:46 2021 -0500
@@ -0,0 +1,26 @@
+---
+
+- name: create writefreely s3 backup shell script
+  become: yes
+  copy:
+    src: "writefreely-s3-backup.sh"
+    dest: "/usr/local/bin/writefreely-s3-backup.sh"
+    mode: "0755"
+
+- name: create s3 backup lifesycle json file
+  become: yes
+  copy:
+    src: "writefreely-s3-backup-lifecycle.json"
+    dest: "/usr/local/share/writefreely-s3-backup-lifecycle.json"
+    mode: "0755"
+
+- name: configure writefreely s3 backup systemd service
+  become: yes
+  template:
+    src: "[email protected]"
+    dest: "/lib/systemd/system/writefreely-s3-backup@{{writefreely_s3_backup_bucket}}.service"
+  notify: reload s3 backup service
+
+- name: ensure writefreely s3 backup service is started
+  become: yes
+  systemd: name="writefreely-s3-backup@{{writefreely_s3_backup_bucket}}.service" enabled="yes"