---
- name: Clear yum cache
  command: "yum clean all"
  ignore_errors: true

- name: Install the required rpms
  package:
    name: "{{ item }}"
    state: latest
  with_items: "{{ gluster_crs_required_packages }}"

- name: Stop firewalld
  service:
    name: firewalld
    state: stopped
    enabled: no

- name: Start Glusterd and iptables
  service:
    name: "{{ item }}"
    state: started
    enabled: true
  with_items:
  - iptables
  - glusterd
