---
###########################
# Common
###########################
compatibility_version: 4.1

# Data center
data_center_name: Default

###########################
# Clusters
###########################
clusters:
  - name: "{{ rhv_cluster }}"
    cpu_type: Intel Conroe Family
    profile: Default
    ha_reservation: true


##########################
# VM infra
##########################
#qcow_url: https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
#qcow_url: https://satellite."{{ public_hosted_zone }}"/pub/rhel-guest-image-7.3-35.x86_64.qcow2
template_cluster: "{{ rhv_cluster }}"
template_name: rhel7
template_memory: 4GiB
template_cpu: 1
template_disk_size: 20GiB
template_nics:
  - name: nic1
    profile_name: ovirtmgmt
    interface: virtio

master_vm:
  cluster: "{{ rhv_cluster }}"
  ssh_key: "{{ root_ssh_key }}"
  domain: "{{ public_hosted_zone }}"
  template: rhel7
  memory: 16GiB
  cores: 2
  high_availability: true
  disks:
    - size: 40GiB
      name: docker_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio
    - size: 40GiB
      name: etcd_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio

node_vm:
  cluster: "{{ rhv_cluster }}"
  ssh_key: "{{ root_ssh_key }}"
  domain: "{{ public_hosted_zone }}"
  template: rhel7
  memory: 8GiB
  cores: 1
  disks:
    - size: 20GiB
      name: docker_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio
    - size: 15GiB
      name: localvol_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio

infra_vm:
  cluster: "{{ rhv_cluster }}"
  ssh_key: "{{ root_ssh_key }}"
  domain: "{{ public_hosted_zone }}"
  template: rhel7
  memory: 8GiB
  cores: 2
  high_availability: true
  disks:
    - size: 20GiB
      name: docker_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio
    - size: 15GiB
      name: localvol_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio

lb_vm:
  cluster: "{{ rhv_cluster }}"
  ssh_key: "{{ root_ssh_key }}"
  domain: "{{ public_hosted_zone }}"
  template: rhel7
  memory: 8GiB
  cores: 1
  high_availability: true
  disks:
    - size: 20GiB
      name: docker_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio
    - size: 15GiB
      name: localvol_disk
      storage_domain: "{{ rhv_data_storage }}"
      interface: virtio

vms:
  # Node VMs
  - name: openshift-node-0
    tag: openshift_node
    profile: "{{ node_vm }}"
  - name: openshift-node-1
    tag: openshift_node
    profile: "{{ node_vm }}"

  # Infra VMs
  - name: openshift-infra-0
    tag: openshift_infra
    profile: "{{ infra_vm }}"
  - name: openshift-infra-1
    tag: openshift_infra
    profile: "{{ infra_vm }}"

  # Master VMs
  - name: openshift-master-0
    profile: "{{ master_vm }}"
    tag: openshift_master
  - name: openshift-master-1
    tag: openshift_master
    profile: "{{ master_vm }}"
  - name: openshift-master-2
    tag: openshift_master
    profile: "{{ master_vm }}"

  # Load balancer
  - name: openshift-lb
    tag: openshift_lb
    profile: "{{ lb_vm }}"

affinity_groups:
  - name: masters_ag
    cluster: "{{ rhv_cluster }}"
    vm_enforcing: false
    vm_rule: negative
    vms:
      - openshift-master-0
      - openshift-master-1
      - openshift-master-2
    wait: true
  - name: infra_ag
    cluster: "{{ rhv_cluster }}"
    vm_enforcing: false
    vm_rule: negative
    vms:
      - openshift-infra-0
      - openshift-infra-1
      - openshift-lb
    wait: true

  - name: app_ag
    cluster: "{{ rhv_cluster }}"
    vm_enforcing: false
    vm_rule: negative
    vms:
      - openshift-node-0
      - openshift-node-1
...
