dendrite/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 16 Sep 2023 01:39:37 -0500
changeset 223 de03976c2df1
parent 174 431c6d5e5dd4
permissions -rw-r--r--
Unifi-7.5 release doesnt seem to support arm so I held the version at 7.4.

---

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

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

- name: configure s3 backup systemd service
  become: yes
  copy:
    src: "[email protected]"
    dest: "/lib/systemd/system/[email protected]"
    mode: "0644"
  notify: restart dendrite instance s3 backup

- name: ensure s3 backup is enabled
  become: yes
  systemd: name="dendrite-s3-backup@{{dendrite_instance}}.service" enabled="yes"