summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks/backup.force_new_cluster.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/etcd/tasks/backup.force_new_cluster.yml')
-rw-r--r--roles/etcd/tasks/backup.force_new_cluster.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/etcd/tasks/backup.force_new_cluster.yml b/roles/etcd/tasks/backup.force_new_cluster.yml
new file mode 100644
index 000000000..24bd0540d
--- /dev/null
+++ b/roles/etcd/tasks/backup.force_new_cluster.yml
@@ -0,0 +1,12 @@
+---
+- include: backup/vars.yml
+
+- name: Move content of etcd backup under the etcd data directory
+ command: >
+ mv "{{ l_etcd_backup_dir }}/member" "{{ l_etcd_data_dir }}"
+
+- name: Set etcd group for the etcd data directory
+ command: >
+ chown -R etcd:etcd "{{ l_etcd_data_dir }}"
+
+- include: auxiliary/force_new_cluster.yml