mount gitea and vmshares gluster volumes on kube host

This commit is contained in:
2022-01-01 10:11:38 -05:00
parent 261c650214
commit 616b6bae5c
3 changed files with 16 additions and 8 deletions

View File

@@ -15,12 +15,12 @@ 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: nextcloud # - name: nextcloud2
# - name: prometheus # - name: prometheus
# - name: tmp # - name: tmp
@@ -29,7 +29,7 @@ volumes:
removed: removed:
- name: jenkins2 - name: jenkins2
- name: nextcloud2 - name: nextcloud
- name: postgres - name: postgres
mounts: mounts:
@@ -44,10 +44,10 @@ mounts:
postgres: /data/glusterfs/postgres/brick1 # dead postgres: /data/glusterfs/postgres/brick1 # dead
prometheus: /data/glusterfs/prometheus/brick1 prometheus: /data/glusterfs/prometheus/brick1
tmp: /data/glusterfs/tmp/brick1 tmp: /data/glusterfs/tmp/brick1
vmshare: /data/glusterfs/vmshares/brick1 vmshares: /data/glusterfs/vmshares/brick1
cubox-i: cubox-i:
- name: vmshare - name: vmshares
status: mounted status: mounted
src: "UUID=d1b005e1-294f-4588-b9a6-21b72f7e3e0f" src: "UUID=d1b005e1-294f-4588-b9a6-21b72f7e3e0f"
- name: gitea - name: gitea
@@ -76,7 +76,7 @@ mounts:
src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4" src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4"
home: home:
- name: vmshare - name: vmshares
status: mounted status: mounted
src: "UUID=1ee11dc5-0b55-47bd-a92c-e644175a8ba9" src: "UUID=1ee11dc5-0b55-47bd-a92c-e644175a8ba9"
- name: gitea - name: gitea

View File

@@ -5,6 +5,10 @@
path: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}/.glusterfs" path: "{{mounts.paths[item.name]}}/{{volumes.brick_folder}}/.glusterfs"
register: gluster_volume_config register: gluster_volume_config
- name: "Old gluster volume {{item.name}} needs to be removed"
debug:
var: gluster_volume_config.stat.exists
- name: remove old gluster volumes - name: remove old gluster volumes
block: block:
- name: remove volume - name: remove volume

View File

@@ -8,4 +8,8 @@ fstab:
state: mounted state: mounted
- name: gitea - name: gitea
path: "/var/lib/gitea" path: "/var/lib/gitea"
state: absent state: present
- name: vmshares
path: "/opt/shared glusterfs"
state: present