hacking at glusterfs
cubox-i role for specific configs
This commit is contained in:
33
roles/cubox-i.xai-corp.net/defaults/main.yml
Normal file
33
roles/cubox-i.xai-corp.net/defaults/main.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
# defaults/main.yml
|
||||
# define default variable values here
|
||||
#/dev/sda6 /data/glusterfs/vmshares/brick1 xfs defaults 0 0
|
||||
|
||||
cubox-i:
|
||||
fstab:
|
||||
add:
|
||||
vmshare:
|
||||
host: /dev/sda6
|
||||
mount: /data/glusterfs/vmshares/brick1
|
||||
fstype: xfs
|
||||
attr: defaults
|
||||
gitea:
|
||||
host: /dev/sda7
|
||||
mount: /data/glusterfs/gitea/brick1
|
||||
fstype: xfs
|
||||
attr: defaults
|
||||
vmshare:
|
||||
host: /dev/sda8
|
||||
mount: /data/glusterfs/jenkins/brick1
|
||||
fstype: xfs
|
||||
attr: defaults
|
||||
gitea:
|
||||
host: /dev/sda9
|
||||
mount: /data/glusterfs/tmp/brick1
|
||||
fstype: xfs
|
||||
attr: defaults
|
||||
gitea:
|
||||
host: /dev/sda10
|
||||
mount: /data/glusterfs/elasticsearch/brick1
|
||||
fstype: xfs
|
||||
attr: defaults
|
||||
22
roles/cubox-i.xai-corp.net/tasks/main.yml
Normal file
22
roles/cubox-i.xai-corp.net/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# main tasks for special cubox-i config
|
||||
|
||||
|
||||
- name: create mount points
|
||||
file:
|
||||
path: "{{ item.value.mount }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
with_dict: cubox-i.fstab.add
|
||||
|
||||
- name: create glusterfs mount hosts file entries
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: /etc/fstab
|
||||
insertafter: EOF
|
||||
regexp: '^#?{{ item.value.host }}'
|
||||
line: '{{ item.value.host }} {{ item.value.mount }} {{ item.value.fstype }} {{ item.value.attr }} 0 0'
|
||||
with_dict: cubox-i.fstab.add
|
||||
|
||||
|
||||
- name: mute syslog
|
||||
Reference in New Issue
Block a user