mercurial/aws-s3-backup/tasks/main.yaml
changeset 56 59e94b4a91a2
parent 2 2556522a2a45
child 157 5e5c9e605142
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/aws-s3-backup/tasks/main.yaml	Mon Jun 29 18:38:49 2020 -0500
@@ -0,0 +1,19 @@
+---
+
+- name: create mercurial s3 backup shell script
+  become: yes
+  copy:
+    src: "mercurial-s3-backup.sh"
+    dest: "/usr/local/bin/mercurial-s3-backup.sh"
+    mode: "0755"
+
+- name: configure mercurial s3 backup systemd service
+  become: yes
+  template:
+    src: "[email protected]"
+    dest: "/lib/systemd/system/mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service"
+  notify: reload s3 backup service
+
+- name: ensure mercurial s3 backup service is started
+  become: yes
+  systemd: name="mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service" enabled="yes"