mercurial/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 19 Jul 2021 21:15:42 -0500
changeset 167 e3c49bf5fae9
parent 157 5e5c9e605142
permissions -rw-r--r--
Added index to dendrite nginx template.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: create mercurial s3 backup shell script
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  copy:
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
    src: "mercurial-s3-backup.sh"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
    dest: "/usr/local/bin/mercurial-s3-backup.sh"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    mode: "0755"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
157
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    10
- name: create s3 backup lifesycle json file
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    11
  become: yes
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    12
  copy:
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    13
    src: "mercurial-s3-backup-lifecycle.json"
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    14
    dest: "/usr/local/share/mercurial-s3-backup-lifecycle.json"
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    15
    mode: "0755"
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    16
0
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
- name: configure mercurial s3 backup systemd service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
  template:
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
    src: "[email protected]"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
    dest: "/lib/systemd/system/mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  notify: reload s3 backup service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
- name: ensure mercurial s3 backup service is started
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
  systemd: name="mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service" enabled="yes"