Skip to content
Snippets Groups Projects
Commit 04633c54 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

gluster changes

parent 8200243e
No related branches found
No related tags found
1 merge request!481gluster changes
---
#https://docs.gluster.org/en/latest/Administrator%20Guide/Storage%20Pools/
- name: install gluster repository
yum:
name:
- centos-release-gluster9
state: present
enablerepo: extras
update_cache: yes
when: ansible_os_family == 'RedHat'
become: true
become_user: root
register: glusterrepo_added
- name: force refresh of the repository cache
shell: |
yum clean metadata
yum clean all
yum updateinfo
yum makecache
become: true
async: 600
poll: 5
check_mode: no
when: ansible_os_family == 'RedHat' and glusterrepo_added.changed
args:
warn: False
- name: install gluster
yum:
name:
- glusterfs-3.12.7-1.el7
- glusterfs-server-3.12.7-1.el7
- glusterfs-9.2
- glusterfs-server-9.2
state: present
#disablerepo: base
update_cache: yes
disablerepo: base,monashhpc_base,updates
when: ansible_os_family == 'RedHat'
become: true
become_user: root
register: gluster_installed
- name: install gluster
apt: name=glusterfs-server state=present
when: ansible_os_family == 'Debian'
become: true
become_user: root
- name: start daemon
service: name=glusterd enabled=yes state=started
become: true
become_user: root
when: ansible_os_family == 'RedHat'
- name: start glusterfs
service: name=glusterfsd enabled=yes state=started
become: true
become_user: root
when: ansible_os_family == 'RedHat'
when: ansible_os_family == 'RedHat' and gluster_installed.changed
- name: start daemon
service: name=glusterfs-server enabled=yes state=started
......@@ -35,26 +59,44 @@
become_user: root
when: ansible_os_family == 'Debian'
- name: make brick dir
file: state=directory path="{{ brickmnt }}/brick"
become: true
become_user: root
#- name: make brick dir
# file: state=directory path="{{ brickmnt }}/brick"
# become: true
# become_user: root
# when: gluster_installed.changed
- name: set quorum ratio
command: "gluster volume set all cluster.server-quorum-ratio 51%"
become: true
become_user: root
ignore_errors: yes
- name: set quorum type
command: "gluster volume set all cluster.server-quorum-type server"
run_once: True
delegate_to: "{{ groups['SQLNodes'][0] }}"
when: gluster_installed.changed
- name: enable bitrot
command: "gluster volume bitrot gv enable"
become: true
become_user: root
ignore_errors: true
ignore_errors: yes
run_once: True
delegate_to: "{{ groups['SQLNodes'][0] }}"
when: gluster_installed.changed
#gluster volume bitrot <VOLNAME> enable
- name: set quorum type
command: "gluster volume set all cluster.quorum-type auto"
become: true
become_user: root
ignore_errors: true
#not needed anymore or not supported
#- name: set quorum type
# command: "gluster volume set all cluster.server-quorum-type server"
# become: true
# become_user: root
# ignore_errors: true
#- name: set quorum type
# command: "gluster volume set all cluster.quorum-type auto"
# become: true
# become_user: root
# ignore_errors: true
#gluster volume heal <vol> info
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment