---
- include: ../verify_ansible_version.yml

- include: ../evaluate_groups.yml
  vars:
    # Do not allow adding hosts during upgrade.
    g_new_master_hosts: []
    g_new_node_hosts: []
    openshift_cluster_id: "{{ cluster_id | default('default') }}"
    openshift_deployment_type: "{{ deployment_type }}"

- name: Set oo_options
  hosts: oo_all_hosts
  tasks:
  - set_fact:
      openshift_docker_additional_registries: "{{ lookup('oo_option', 'docker_additional_registries') }}"
    when: openshift_docker_additional_registries is not defined
  - set_fact:
      openshift_docker_insecure_registries: "{{ lookup('oo_option',  'docker_insecure_registries') }}"
    when: openshift_docker_insecure_registries is not defined
  - set_fact:
      openshift_docker_blocked_registries: "{{ lookup('oo_option', 'docker_blocked_registries') }}"
    when: openshift_docker_blocked_registries is not defined
  - set_fact:
      openshift_docker_options: "{{ lookup('oo_option', 'docker_options') }}"
    when: openshift_docker_options is not defined
  - set_fact:
      openshift_docker_log_driver: "{{ lookup('oo_option', 'docker_log_driver') }}"
    when: openshift_docker_log_driver is not defined
  - set_fact:
      openshift_docker_log_options: "{{ lookup('oo_option', 'docker_log_options') }}"
    when: openshift_docker_log_options is not defined

- include: ../initialize_facts.yml
