block bootstrap
This commit is contained in:
parent
357ecd1b3e
commit
5d9063e236
2 changed files with 24 additions and 18 deletions
5
roles/gluster/handlers/main.yaml
Normal file
5
roles/gluster/handlers/main.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart rpcbind
|
||||
service:
|
||||
name: rpcbind
|
||||
state: restarted
|
|
@ -54,24 +54,25 @@
|
|||
opts: noatime
|
||||
fstype: ext4
|
||||
state: mounted
|
||||
- name: gluster peers
|
||||
gluster_peer:
|
||||
nodes:
|
||||
- node01
|
||||
- node02
|
||||
- node03
|
||||
when: ansible_nodename == "node01"
|
||||
- name: gluster volume
|
||||
gluster_volume:
|
||||
name: data
|
||||
replicas: 3
|
||||
state: present
|
||||
bricks: /mnt/gluster/data
|
||||
start_on_create: yes
|
||||
cluster:
|
||||
- node01
|
||||
- node02
|
||||
- node03
|
||||
- name: bootstrap gluster cluster
|
||||
block:
|
||||
- name: gluster peers
|
||||
gluster_peer:
|
||||
nodes:
|
||||
- node01
|
||||
- node02
|
||||
- node03
|
||||
- name: gluster volume
|
||||
gluster_volume:
|
||||
name: data
|
||||
replicas: 3
|
||||
state: present
|
||||
bricks: /mnt/gluster/data
|
||||
start_on_create: yes
|
||||
cluster:
|
||||
- node01
|
||||
- node02
|
||||
- node03
|
||||
when: ansible_nodename == "node01"
|
||||
- name: gluster client package
|
||||
apt:
|
||||
|
|
Loading…
Reference in a new issue