Add first gluster volume back
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
- include_tasks: create_cluster.yaml
|
||||
|
||||
#- include_tasks: manage_volumes.yml
|
||||
- include_tasks: volumes/main.yml
|
||||
|
||||
## doesn't work
|
||||
#- name: "check the underlying config"
|
||||
|
||||
12
ansible-5/roles/glusterfs-server/tasks/volumes/fstab.yaml
Normal file
12
ansible-5/roles/glusterfs-server/tasks/volumes/fstab.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
# tasks/volumes/fstab
|
||||
# setup storage volumes
|
||||
|
||||
- name: Create fstab entries
|
||||
ansible.posix.mount:
|
||||
path: "{{ mounts.paths[item.name] }}"
|
||||
src: "{{ item.src }}"
|
||||
fstype: "xfs"
|
||||
opts: "defaults,noatime,nofail,x-systemd.device-timeout=10 0 0"
|
||||
state: "{{ item.status }}"
|
||||
with_items: "{{mounts[inventory_hostname]}}"
|
||||
@@ -6,19 +6,7 @@
|
||||
#
|
||||
|
||||
# Mount drives in fstab
|
||||
- name: Create fstab entries
|
||||
ansible.posix.mount:
|
||||
path: "{{ mounts.paths[item.name] }}"
|
||||
src: "{{ item.src }}"
|
||||
fstype: "xfs"
|
||||
opts: "defaults,noatime,nofail,x-systemd.device-timeout=10 0 0"
|
||||
state: "{{ item.status }}"
|
||||
with_items: "{{mounts[inventory_hostname]}}"
|
||||
|
||||
- name: create pool
|
||||
gluster.gluster.gluster_peer:
|
||||
state: present
|
||||
nodes: "{{ cluster }}"
|
||||
- include_tasks: fstab.yaml
|
||||
|
||||
# manage volumes
|
||||
|
||||
@@ -43,15 +31,15 @@
|
||||
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
|
||||
#- 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