diff options
| author | Luke Hoersten <[email protected]> | 2020-02-09 12:05:37 -0600 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-02-09 12:05:37 -0600 |
| commit | 1cb30cc0aa4fda9bf0bac0b41ace862b1db434b8 (patch) | |
| tree | e4b27462ba4b8b249bb5eaac4b4be0006ca0392c /roles/mercurial | |
| parent | 195a4a3fcf65bf47ecb1a0ea2a9fb070c18eb20f (diff) | |
Moved roles to top level
Diffstat (limited to 'roles/mercurial')
| -rw-r--r-- | roles/mercurial/files/mercurial-s3-backup.sh | 10 | ||||
| -rw-r--r-- | roles/mercurial/handlers/main.yaml | 5 | ||||
| -rw-r--r-- | roles/mercurial/tasks/main.yaml | 23 | ||||
| -rw-r--r-- | roles/mercurial/templates/[email protected] | 9 |
4 files changed, 0 insertions, 47 deletions
diff --git a/roles/mercurial/files/mercurial-s3-backup.sh b/roles/mercurial/files/mercurial-s3-backup.sh deleted file mode 100644 index b5ba305..0000000 --- a/roles/mercurial/files/mercurial-s3-backup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -BUCKET=$1 -DATE=`date --iso-8601` -BACKUP_DIR=$2 -BACKUP_TAR="/tmp/$BUCKET-$DATE.tgz" - -tar -zc -f $BACKUP_TAR $BACKUP_DIR -aws s3 mb "s3://$BUCKET/" -aws s3 cp $BACKUP_TAR "s3://$BUCKET/" diff --git a/roles/mercurial/handlers/main.yaml b/roles/mercurial/handlers/main.yaml deleted file mode 100644 index 8c3315b..0000000 --- a/roles/mercurial/handlers/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- name: reload s3 backup service - systemd: name="mercurial-s3-backup@{{mercurial_s3_backup_bucket}}.service" enabled="yes" daemon_reload="yes" - become: yes diff --git a/roles/mercurial/tasks/main.yaml b/roles/mercurial/tasks/main.yaml deleted file mode 100644 index e766752..0000000 --- a/roles/mercurial/tasks/main.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -- name: install mercurial - become: yes - apt: name="mercurial" - -- 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" diff --git a/roles/mercurial/templates/[email protected] b/roles/mercurial/templates/[email protected] deleted file mode 100644 index ba6ca80..0000000 --- a/roles/mercurial/templates/[email protected] +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Mercurial s3 backup for "%I" - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/mercurial-s3-backup.sh %i "{{mercurial_s3_backup_dir}}" - -[Install] -WantedBy=aws-s3-backup.target |
