Add first gluster volume back
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
# glusterfs_daemon: glusterd
|
||||
cluster:
|
||||
- cubox-i
|
||||
- cubox-m
|
||||
# - cubox-m
|
||||
move_brick:
|
||||
- gitea
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ volumes:
|
||||
brick_folder: brick
|
||||
# bricks found at "{{mounts.paths[gitea]}}/{{volumes.brick_folder}}"
|
||||
replicated:
|
||||
- name: gitea
|
||||
- name: jenkins
|
||||
- name: vmshares
|
||||
# - name: gitea
|
||||
# - name: jenkins
|
||||
# - name: vmshares
|
||||
# - name: mariadb
|
||||
# - name: plex
|
||||
- name: plex
|
||||
# - name: nextcloud2
|
||||
# - name: prometheus
|
||||
# - name: tmp
|
||||
@@ -81,31 +81,32 @@ mounts:
|
||||
status: mounted
|
||||
src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4"
|
||||
|
||||
home:
|
||||
- name: vmshares
|
||||
status: mounted
|
||||
src: "UUID=1ee11dc5-0b55-47bd-a92c-e644175a8ba9"
|
||||
- name: gitea
|
||||
status: mounted
|
||||
src: "UUID=1a10b5b3-a00b-463c-bb47-d7a1430357c2"
|
||||
- name: jenkins
|
||||
status: mounted
|
||||
src: "UUID=c1ae3332-8ccc-42c4-beb9-217e0dd58835"
|
||||
- name: tmp
|
||||
status: mounted
|
||||
src: "UUID=cad3eb8f-bd07-499b-b1f0-19ec14ba0084"
|
||||
- name: nextcloud
|
||||
status: mounted
|
||||
src: "UUID=179763ba-27cc-4dbf-a0b2-01596727c541"
|
||||
- name: prometheus
|
||||
status: mounted
|
||||
src: "UUID=19ec83ce-cb19-465f-ba79-0426a659541d"
|
||||
- name: mariadb
|
||||
status: mounted
|
||||
src: "UUID=fa3adff4-b456-4321-8528-eed843615191"
|
||||
- name: plex
|
||||
status: mounted
|
||||
src: "UUID=2e87570b-4750-4aeb-926b-1d9b48ef89b3"
|
||||
- name: nextcloud2
|
||||
status: mounted
|
||||
src: "UUID=b0dc64be-80b1-49f6-ae0f-ae6219e734c9"
|
||||
home: []
|
||||
cubox-m: []
|
||||
# - name: vmshares
|
||||
# status: mounted
|
||||
# src: "UUID=1ee11dc5-0b55-47bd-a92c-e644175a8ba9"
|
||||
# - name: gitea
|
||||
# status: mounted
|
||||
# src: "UUID=1a10b5b3-a00b-463c-bb47-d7a1430357c2"
|
||||
# - name: jenkins
|
||||
# status: mounted
|
||||
# src: "UUID=c1ae3332-8ccc-42c4-beb9-217e0dd58835"
|
||||
# - name: tmp
|
||||
# status: mounted
|
||||
# src: "UUID=cad3eb8f-bd07-499b-b1f0-19ec14ba0084"
|
||||
# - name: nextcloud
|
||||
# status: mounted
|
||||
# src: "UUID=179763ba-27cc-4dbf-a0b2-01596727c541"
|
||||
# - name: prometheus
|
||||
# status: mounted
|
||||
# src: "UUID=19ec83ce-cb19-465f-ba79-0426a659541d"
|
||||
# - name: mariadb
|
||||
# status: mounted
|
||||
# src: "UUID=fa3adff4-b456-4321-8528-eed843615191"
|
||||
# - name: plex
|
||||
# status: mounted
|
||||
# src: "UUID=2e87570b-4750-4aeb-926b-1d9b48ef89b3"
|
||||
# - name: nextcloud2
|
||||
# status: mounted
|
||||
# src: "UUID=b0dc64be-80b1-49f6-ae0f-ae6219e734c9"
|
||||
|
||||
@@ -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