From 408b78a9376f3c03a5b1d36fe0196678996a8b0d Mon Sep 17 00:00:00 2001 From: gdmelloatpoints Date: Fri, 23 Jun 2017 15:41:17 -0400 Subject: [PATCH] Make etcd_backup_prefix configurable. Ensures that backups can be stored on a different location other than ${HOST}/var/backups, say an EBS volume on AWS. --- inventory/group_vars/all.yml | 3 +++ roles/etcd/handlers/backup.yml | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 6388ca7af..997386728 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -4,6 +4,9 @@ bootstrap_os: none #Directory where etcd data stored etcd_data_dir: /var/lib/etcd +#Directory where etcd backups are stored on the host +etcd_backup_prefix: /var/backups + # Directory where the binaries will be installed bin_dir: /usr/local/bin diff --git a/roles/etcd/handlers/backup.yml b/roles/etcd/handlers/backup.yml index 9a611296b..750271ffc 100644 --- a/roles/etcd/handlers/backup.yml +++ b/roles/etcd/handlers/backup.yml @@ -13,10 +13,6 @@ - name: Refresh Time Fact setup: filter=ansible_date_time -- name: Set etcd Backup Directory Prefix - set_fact: - etcd_backup_prefix: '/var/backups' - - name: Set Backup Directory set_fact: etcd_backup_directory: "{{ etcd_backup_prefix }}/etcd-{{ ansible_date_time.date }}_{{ ansible_date_time.time }}"