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

# Data center
data_center_name: Default

##########################
# VM infra
##########################
template_cluster: "{{ rhv_cluster }}"
template_name: atomic7
template_memory: 8GiB
template_cpu: 1
template_disk_storage: "{{ rhv_data_storage }}"
template_disk_size: 60GiB
template_nics:
  - name: nic1
    profile_name: ovirtmgmt
    interface: virtio

master_vm:
  cluster: "{{ rhv_cluster }}"
  template: "{{ template_name }}"
  memory: 16GiB
  cores: 2
  high_availability: true
  disks:
    - size: 100GiB
      storage_domain: "{{ rhv_data_storage }}"
      name: docker_disk
      interface: virtio

node_vm:
  cluster: "{{ rhv_cluster }}"
  template: "{{ template_name }}"
  memory: 8GiB
  cores: 2
  disks:
    - size: 100GiB
      storage_domain: "{{ rhv_data_storage }}"
      name: docker_disk
      interface: virtio
    - size: 50GiB
      storage_domain: "{{ rhv_data_storage }}"
      name: localvol_disk
      interface: virtio


vms:
  # Node VMs
  - name: openshift-node-0
    tag: openshift_node
    profile: "{{ node_vm }}"
    cloud_init:
      host_name: "openshift-node-0.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"
  - name: openshift-node-1
    tag: openshift_node
    profile: "{{ node_vm }}"
    cloud_init:
      host_name: "openshift-node-1.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"

  # Infra VMs
  - name: openshift-infra-0
    tag: openshift_infra
    profile: "{{ node_vm }}"
    cloud_init:
      host_name: "openshift-infra-0.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"
  - name: openshift-infra-1
    tag: openshift_infra
    profile: "{{ node_vm }}"
    cloud_init:
      host_name: "openshift-infra-1.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"

  # Master VMs
  - name: openshift-master-0
    profile: "{{ master_vm }}"
    tag: openshift_master
    cloud_init:
      host_name: "openshift-master-0.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"
  - name: openshift-master-1
    tag: openshift_master
    profile: "{{ master_vm }}"
    cloud_init:
      host_name: "openshift-master-1.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"
  - name: openshift-master-2
    tag: openshift_master
    profile: "{{ master_vm }}"
    cloud_init:
      host_name: "openshift-master-2.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"

  # Load balancer
  - name: openshift-lb
    tag: openshift_lb
    profile: "{{ node_vm }}"
    cloud_init:
      host_name: "openshift-lb.{{ public_hosted_zone }}"
      authorized_ssh_keys: "{{ root_ssh_key }}"

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
...
