mount partitions for glusterfs volumes

This commit is contained in:
2021-12-26 09:33:23 -05:00
parent 697b00fa4e
commit 74a32b4a02
8 changed files with 263 additions and 44 deletions

View File

@@ -0,0 +1,109 @@
---
# 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).
#
machines:
cubox-i:
fstab:
add:
# nextcloud2:
# src: UUID=ced31b8e-8404-4bff-b428-6411c54451a4
# path: /data/glusterfs/nextcloud2/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
remove:
# vmshare:
# src: /dev/sda6
# path: /data/glusterfs/vmshares/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# gitea:
# src: /dev/sda7
# path: /data/glusterfs/gitea/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# jenkins:
# src: /dev/sda8
# path: /data/glusterfs/jenkins/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# tmp:
# src: /dev/sda9
# path: /data/glusterfs/tmp/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# nextcloud:
# src: /dev/sda10
# path: /data/glusterfs/nextcloud/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# prometheus:
# src: /dev/sda11
# path: /data/glusterfs/prometheus/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# mariadb:
# src: /dev/sda12
# path: /data/glusterfs/mariadb/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# plex:
# src: /dev/sda13
# path: /data/glusterfs/plex/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
home:
fstab:
add:
# vmshare:
# src: UUID=1ee11dc5-0b55-47bd-a92c-e644175a8ba9
# path: /data/glusterfs/vmshares/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# gitea:
# src: UUID=1a10b5b3-a00b-463c-bb47-d7a1430357c2
# path: /data/glusterfs/gitea/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# jenkins:
# src: UUID=c1ae3332-8ccc-42c4-beb9-217e0dd58835
# path: /data/glusterfs/jenkins/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# tmp:
# src: UUID=cad3eb8f-bd07-499b-b1f0-19ec14ba0084
# path: /data/glusterfs/tmp/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# nextcloud:
# src: UUID=179763ba-27cc-4dbf-a0b2-01596727c541
# path: /data/glusterfs/nextcloud/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# prometheus:
# src: UUID=19ec83ce-cb19-465f-ba79-0426a659541d
# path: /data/glusterfs/prometheus/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# mariadb:
# src: UUID=fa3adff4-b456-4321-8528-eed843615191
# path: /data/glusterfs/mariadb/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# plex:
# src: UUID=2e87570b-4750-4aeb-926b-1d9b48ef89b3
# path: /data/glusterfs/plex/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
# nextcloud2:
# src: UUID=b0dc64be-80b1-49f6-ae0f-ae6219e734c9
# path: /data/glusterfs/nextcloud2/brick1
# fstype: xfs
# options: defaults,noatime,nofail,x-systemd.device-timeout=10 0 0
remove:

View File

@@ -5,4 +5,8 @@
# update packages to latest
- include_tasks: apply_updates.yml
- include_tasks: motd.yml
- name: update login screen
include_tasks: motd.yml
- name: update fstab
include_tasks: update_fstab.yml

View File

@@ -0,0 +1,11 @@
---
# set mount points in fstab
- name: Create fstab entries
ansible.posix.mount:
path: "{{ item.value.path }}"
src: "{{ item.value.src }}"
fstype: "{{ item.value.fstype }}"
opts: "{{ item.value.options }}"
state: mounted
with_dict: "{{machines[inventory_hostname].fstab.add}}"