Fix installation of glusterd server

This commit is contained in:
2022-08-29 21:13:04 -04:00
parent aedf86ef0a
commit 7ff5dc892f
13 changed files with 77 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
---
# remove a volume
- name: "check for existing {{mounts.paths[item.name]}}/{{volumes.brick_folder}}/.glusterfs"
stat:
path: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}/.glusterfs"
register: gluster_volume_config
- name: "Old gluster volume {{item.name}} needs to be removed"
debug:
var: gluster_volume_config.stat.exists
- name: remove old gluster volumes
block:
- name: remove volume
gluster_volume:
state: absent
name: "{{item.name}}"
# rebalance: no
# replicas: false
force: true
cluster: "{{cluster}}"
run_once: true
- name: remove .glusterfs folder
ansible.builtin.shell: "rm -rf {{mounts.paths[item.name]}}/.glusterfs"
when: gluster_volume_config.stat.exists