---
- hosts: localhost
  gather_facts: yes
  ignore_errors: yes
  vars_files:
  - vars/main.yaml
  roles:
  # Group systems
  - instance-groups

- include: prerequisite.yaml

- name: call openshift includes for installer
  include: /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml
  vars:
    openshift_release: "v3.6"
    debug_level: 2
    console_port: 8443
    openshift_debug_level: "{{ debug_level }}"
    openshift_node_debug_level: "{{ node_debug_level | default(debug_level, true) }}"
    osm_controller_args:
      cloud-provider:
      - "vsphere"
      cloud-config:
      - "/etc/vsphere/vsphere.conf"
    osm_api_server_args:
      cloud-provider:
      - "vsphere"
      cloud-config:
      - "/etc/vsphere/vsphere.conf"
    openshift_node_kubelet_args:
      cloud-provider:
      - "vsphere"
      cloud-config:
      - "/etc/vsphere/vsphere.conf"
      node-labels:
      - "role={{ openshift_node_labels.role }}"
    openshift_master_debug_level: "{{ master_debug_level | default(debug_level, true) }}"
    openshift_master_access_token_max_seconds: 2419200
    openshift_hosted_router_replicas: 1
    openshift_hosted_registry_replicas: 1
    openshift_master_api_port: "{{ console_port }}"
    openshift_master_console_port: "{{ console_port }}"
    openshift_master_logging_public_url: "https://kibana.{{ osm_default_subdomain }}"
    openshift_node_local_quota_per_fsgroup: 512Mi
    osm_cluster_network_cidr: 172.16.0.0/16
    osm_use_cockpit: false
    osm_default_node_selector: "role=app"
    openshift_registry_selector: "role=infra"
    openshift_override_hostname_check: true
    openshift_router_selector: "role=infra"
    openshift_master_cluster_method: native
    openshift_cloudprovider_kind: vsphere
    wildcard_zone:
    osm_default_subdomain: "{{ wildcard_zone }}"
    openshift_master_default_subdomain: "{{osm_default_subdomain}}"
    deployment_type:
    load_balancer_hostname:
    openshift_master_cluster_hostname: "{{ load_balancer_hostname }}"
    openshift_master_cluster_public_hostname: "{{ load_balancer_hostname }}"
    os_sdn_network_plugin_name: "{{ openshift_sdn }}"
    openshift_master_identity_providers:
    - name: Active_Directory
      challenge: true
      login: true
      kind: LDAPPasswordIdentityProvider
      attributes:
        id:
        - dn
        email:
        - mail
        name:
        - cn
        preferredUsername:
        - uid
      insecure: true
      url:
      bindDN:
      bindPassword:
    openshift_hosted_registry_storage_kind: nfs
    openshift_hosted_registry_storage_access_modes: ['ReadWriteMany']
    openshift_hosted_registry_storage_host:
    openshift_hosted_registry_storage_nfs_directory:
    openshift_hosted_registry_storage_volume_name: registry
    openshift_hosted_registry_storage_volume_size: 20Gi
    openshift_master_metrics_public_url: "https://metrics.{{ osm_default_subdomain }}/hawkular/metrics"
    openshift_hosted_metrics_storage_kind: nfs
    openshift_hosted_metrics_storage_access_modes: ['ReadWriteOnce']
    openshift_hosted_metrics_storage_host:
    openshift_hosted_metrics_storage_nfs_directory:
    openshift_hosted_metrics_storage_volume_name: metrics
    openshift_hosted_metrics_storage_volume_size: 10Gi
#openshift_master_identity_providers: "[{'name': 'allow_all', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]"
