summaryrefslogtreecommitdiffstats
path: root/roles/glusterfs/tasks/setup-external-server.yml
blob: cc0b2f1dccca2811bc5b4cac1c19f19ac0022bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
- name: Ensure GlusterFS is installed
  yum: name={{item}} state=present
  with_items:
    - glusterfs-server
    - glusterfs-rdma
    - glusterfs

- name: Ensure GlusterFS service is running
  service: name=glusterd state=started enabled=yes

- name: Ensure firewalld is running
  service: name=firewalld state=started enabled=yes

- name: Configure firewalld
  firewalld: rich_rule="rule family=ipv4 source address={{glusterfs_network}} service name=glusterfs accept" state="enabled" permanent="true" immediate="true"
  when: glusterfs_network is defined
  
- name: Configure firewalld
  firewalld: service="glusterfs" state="enabled" permanent="true" immediate="true"
  when: not glusterfs_network is defined

- name: Reload firewalld rules
  shell: firewall-cmd --reload

- name: Create folder for GlusterFS bricks
  file: dest="{{glusterfs_bricks_path}}" owner="root" group="root" mode="0755" state="directory"