From 755249febfcba269db711ea67e7089b6533778dd Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 6 May 2020 02:10:26 -0500 Subject: [PATCH] Move backups to using symlinks instead of hard directories This should make reconfiguring backup outputs leagues easier --- ec2.yml | 1 + roles/backups/tasks/main.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ec2.yml b/ec2.yml index 685fde4..93d3b38 100644 --- a/ec2.yml +++ b/ec2.yml @@ -15,6 +15,7 @@ 65323365313465316635646465376665616132653832316362363535366563363863636530313666 3036393134386131310a643734363261633166636263343538313533393738323934303137343163 39636637643035616236663364663562366133613233313139623937313531343564 + backups_outdir: "/cold/backups" acme_directory: "https://acme-v02.api.letsencrypt.org/directory" #acme_directory: "https://acme-staging-v02.api.letsencrypt.org/directory" acme_version: 2 diff --git a/roles/backups/tasks/main.yml b/roles/backups/tasks/main.yml index cfa1a67..e89c8ca 100644 --- a/roles/backups/tasks/main.yml +++ b/roles/backups/tasks/main.yml @@ -10,8 +10,13 @@ path: "{{ item }}" loop: - "/opt/backups" - - "/backups" - "/opt/backups/modules" + - "{{ backups_outdir }}" + - name: Create /backups symlink + file: + state: link + path: "/backups" + src: "{{ backups_outdir }}" - name: Template out backup script template: src: "backup.sh"