Add first gluster volume back

This commit is contained in:
2022-09-07 21:56:09 -04:00
parent ffc56dd893
commit e6b7e104cd
6 changed files with 59 additions and 58 deletions

View File

@@ -17,7 +17,7 @@
# glusterfs_daemon: glusterd # glusterfs_daemon: glusterd
cluster: cluster:
- cubox-i - cubox-i
- cubox-m # - cubox-m
move_brick: move_brick:
- gitea - gitea

View File

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

View File

@@ -9,7 +9,7 @@
- include_tasks: create_cluster.yaml - include_tasks: create_cluster.yaml
#- include_tasks: manage_volumes.yml - include_tasks: volumes/main.yml
## doesn't work ## doesn't work
#- name: "check the underlying config" #- name: "check the underlying config"

View 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]}}"

View File

@@ -6,19 +6,7 @@
# #
# Mount drives in fstab # Mount drives in fstab
- name: Create fstab entries - include_tasks: fstab.yaml
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 }}"
# manage volumes # manage volumes
@@ -43,15 +31,15 @@
with_items: "{{volumes.replicated}}" with_items: "{{volumes.replicated}}"
run_once: true run_once: true
- name: create distributed gluster volumes #- name: create distributed gluster volumes
gluster_volume: # gluster_volume:
state: present # state: present
name: "{{ item.name }}" # name: "{{ item.name }}"
brick: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}" # brick: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}"
rebalance: no # rebalance: no
replicas: false # replicas: false
# force: true ## force: true
cluster: "{{cluster}}" # cluster: "{{cluster}}"
with_items: "{{volumes.distributed}}" # with_items: "{{volumes.distributed}}"
run_once: true # run_once: true