---
# This playbook will use local storage on the RHV hypervisor nodes to create
# a glusterfs cluster with exports for use as RHV's data storage
#
- hosts: hypervisors
  gather_facts: yes
  become: yes
  serial: 1
  tags:
    - rhsm
  vars_files:
    - vars/vault.yaml
    - vars/main.yaml
  roles:
    - rhsm-subscription

- name: Install and configure Glusterfs prerequisites
  hosts: hypervisors
  become: yes
  tags:
    - install
  vars_files:
    - vars/main.yaml
  roles:
    - gluster-rhsm-repos
    - gluster-crs-prerequisites
    - gluster-ports

- name: Set up basic Glusterfs cluster
  hosts: head
  become: yes
  tags:
    - configure
  vars_files:
    - vars/main.yaml
  roles:
    - gdeployer
