Add first gluster volume back
This commit is contained in:
45
ansible-5/roles/glusterfs-server/tasks/volumes/main.yml
Normal file
45
ansible-5/roles/glusterfs-server/tasks/volumes/main.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
# glusterfs mounts
|
||||
# Use 'blkid' to print the universally unique identifier for a
|
||||
# device; this may be used with UUID= as a more robust way to name devices
|
||||
# that works even if disks are added and removed. See fstab(5).
|
||||
#
|
||||
|
||||
# Mount drives in fstab
|
||||
- include_tasks: fstab.yaml
|
||||
|
||||
# manage volumes
|
||||
|
||||
- include_tasks: remove_volume.yml
|
||||
with_items: "{{volumes.removed}}"
|
||||
|
||||
- name: debug
|
||||
debug:
|
||||
var: item.name
|
||||
with_items: "{{volumes.replicated}}"
|
||||
|
||||
- name: create gluster volumes
|
||||
gluster_volume:
|
||||
state: present
|
||||
start_on_create: yes
|
||||
name: "{{item.name}}"
|
||||
brick: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}"
|
||||
rebalance: no
|
||||
# replicas: 2
|
||||
force: true
|
||||
cluster: "{{cluster}}"
|
||||
with_items: "{{volumes.replicated}}"
|
||||
run_once: true
|
||||
|
||||
#- name: create distributed gluster volumes
|
||||
# gluster_volume:
|
||||
# state: present
|
||||
# name: "{{ item.name }}"
|
||||
# brick: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}"
|
||||
# rebalance: no
|
||||
# replicas: false
|
||||
## force: true
|
||||
# cluster: "{{cluster}}"
|
||||
# with_items: "{{volumes.distributed}}"
|
||||
# run_once: true
|
||||
|
||||
Reference in New Issue
Block a user