cluster_facts.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. - name: Initialize cluster facts
  3. # l_init_fact_hosts is passed in via play during control-plane-only
  4. # upgrades and scale-up plays; otherwise oo_all_hosts is used.
  5. hosts: "{{ l_init_fact_hosts | default('oo_all_hosts') }}"
  6. roles:
  7. - role: openshift_facts
  8. - role: lib_utils
  9. tasks:
  10. - name: get openshift_current_version
  11. # get_current_openshift_version is a custom module in lib_utils
  12. # this will set_fact openshift_current_version
  13. get_current_openshift_version:
  14. deployment_type: "{{ openshift_deployment_type }}"
  15. - name: Gather Cluster facts
  16. openshift_facts:
  17. role: common
  18. local_facts:
  19. deployment_type: "{{ openshift_deployment_type }}"
  20. deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}"
  21. hostname: "{{ openshift_hostname | default(None) }}"
  22. ip: "{{ openshift_ip | default(None) }}"
  23. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  24. public_ip: "{{ openshift_public_ip | default(None) }}"
  25. portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
  26. http_proxy: "{{ openshift_http_proxy | default(None) }}"
  27. https_proxy: "{{ openshift_https_proxy | default(None) }}"
  28. no_proxy: "{{ openshift_no_proxy | default(None) }}"
  29. generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
  30. - name: Set fact of no_proxy_internal_hostnames
  31. openshift_facts:
  32. role: common
  33. local_facts:
  34. no_proxy_internal_hostnames: "{{ hostvars | lib_utils_oo_select_keys(groups['oo_nodes_to_config']
  35. | union(groups['oo_masters_to_config'])
  36. | union(groups['oo_etcd_to_config'] | default([])))
  37. | lib_utils_oo_collect('openshift.common.hostname') | default([]) | join (',')
  38. }}"
  39. when:
  40. - openshift_http_proxy is defined or openshift_https_proxy is defined
  41. - openshift_generate_no_proxy_hosts | default(True) | bool
  42. - name: Initialize openshift.node.sdn_mtu
  43. openshift_facts:
  44. role: node
  45. local_facts:
  46. sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"