---
- include: ../openshift-cluster/initialize_groups.yml

- name: Ensure there are new_nodes
  hosts: localhost
  connection: local
  become: no
  gather_facts: no
  tasks:
  - fail:
      msg: >
        Detected no new_nodes in inventory. Please add hosts to the
        new_nodes host group to add nodes.
    when:
    - g_new_node_hosts | default([]) | length == 0

- include: ../../common/openshift-node/scaleup.yml
  vars:
    openshift_cluster_id: "{{ cluster_id | default('default') }}"
    openshift_debug_level: "{{ debug_level | default(2) }}"
    openshift_master_etcd_hosts: "{{ groups.etcd | default([]) }}"
    openshift_master_etcd_port: 2379
