---
# playbook for gluster file servers


- name: Gluster FS management
  hosts: gfs
  gather_facts: true
  become: true

  vars:
    glusterd:
      version: 9.2-1
      unit: glusterd
      envfile: /etc/sysconfig/glusterd
#    glusterfs_default_release: 6
#    glusterfs_ppa_version: 6
#    glusterfs_daemon: glusterd
    cluster:
      - cubox-i
#      - cubox-m
    move_brick:
      - gitea

  pre_tasks:
#    - name: test vars
#      debug:
#        var: "item.name"
#      with_items: "{{mounts[inventory_hostname]}}"

  roles:
    - glusterfs-server

  post_tasks:
#    - name: check service is up
#      ansible.builtin.service:
#        name: "{{ glusterfs_daemon }}"
#        state: started
#        enabled: true
