# https://github.com/gluster/gluster-ansible-features/blob/master/roles/gluster_hci/README.md
# https://github.com/oVirt/ovirt-ansible-hosted-engine-setup

hc_nodes:
  hosts:
    192.168.255.105:
    192.168.255.106:
    192.168.255.107:

  vars:
    cluster_nodes:
      - 192.168.255.105
      - 192.168.255.106
      - 192.168.255.107
    gluster_features_hci_cluster: "{{ cluster_nodes }}"
    gluster_features_force_varlogsizecheck: false

    gluster_infra_fw_ports:
      - 2049/tcp
      - 54321/tcp
      - 5900-6923/tcp
      - 16514/tcp
    gluster_infra_fw_permanent: true
    gluster_infra_fw_state: enabled
    gluster_infra_fw_zone: public
    gluster_infra_fw_services:
      - glusterfs

    gluster_set_selinux_labels: true
    gluster_infra_disktype: JBOD
    #gluster_infra_diskcount: 12
    #gluster_infra_stripe_unit_size: 128

    gluster_features_hci_volumes:
      - volname: engine
        brick: /gluster_bricks/engine/engine
        arbiter: 0
      - volname: vmstore
        brick: /gluster_bricks/vmstore/vmstore
        arbiter: 0

    gluster_infra_volume_groups:
      - vgname: vg_engine
        pvname: /dev/disk/by-partlabel/engine
      - vgname: vg_vmstore
        pvname: /dev/disk/by-partlabel/vmstore

    gluster_infra_mount_devices:
      - path: /gluster_bricks/engine
        lvname: lv_engine
        vgname: vg_engine
      - path: /gluster_bricks/vmstore
        lvname: lv_vmstore
        vgname: vg_vmstore

    gluster_infra_thick_lvs:
      - lvname: lv_engine
        vgname: vg_engine
        size: 90G

    gluster_infra_thinpools:
      - thinpoolname: tp_vmstore
        #thinpoolsize: 200G
        poolmetadatasize: 16G
        vgname: vg_vmstore

    gluster_infra_lv_logicalvols:
      - vgname: vg_vmstore
        lvname: lv_vmstore
        lvsize: 90G
        thinpool: tp_vmstore

# Define a new group called 'gluster'
# The hosts in this group get added as new RHV hosts
# and the Storage Domains are added
gluster:
  hosts:
    rhhi1.home.lab:  ### This line was added for my last attempt, but it too failed
    rhhi2.home.lab:
    rhhi3.home.lab:
  vars:
    storage_domains:
      - name: engine
        host: 192.168.255.105
        address: 192.168.255.105
        path: /engine
        mount_options: backup-volfile-servers=192.168.255.106:192.168.255.107
      - name: vmstore
        host: 192.168.255.105
        address: 192.168.255.105
        path: /vmstore
        mount_options: backup-volfile-servers=192.168.255.106:192.168.255.107
