mercurial/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 03 May 2020 12:57:47 -0500
changeset 17 41034ea52480
parent 2 2556522a2a45
permissions -rw-r--r--
Completed writefreely role
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: install mercurial
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
  apt: name="mercurial"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: create mercurial s3 backup shell script
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  copy:
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    src: "mercurial-s3-backup.sh"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/usr/local/bin/mercurial-s3-backup.sh"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    mode: "0755"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
- name: configure mercurial s3 backup systemd service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  template:
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    src: "[email protected]"
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    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
    19
  notify: reload s3 backup service
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
- name: ensure mercurial s3 backup service is started
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  become: yes
df042396074e Opensourcing raspberry pi roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  systemd: name="mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service" enabled="yes"