cluster_facts.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. hostname: "{{ openshift_hostname | default(None) }}"
  20. ip: "{{ openshift_ip | default(None) }}"
  21. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  22. public_ip: "{{ openshift_public_ip | default(None) }}"
  23. portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
  24. http_proxy: "{{ openshift_http_proxy | default(None) }}"
  25. https_proxy: "{{ openshift_https_proxy | default(None) }}"
  26. no_proxy: "{{ openshift_no_proxy | default(None) }}"
  27. generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
  28. - name: Set fact of no_proxy_internal_hostnames
  29. openshift_facts:
  30. role: common
  31. local_facts:
  32. no_proxy_internal_hostnames: "{{ hostvars | lib_utils_oo_select_keys(groups['oo_nodes_to_config']
  33. | union(groups['oo_masters_to_config'])
  34. | union(groups['oo_etcd_to_config'] | default([])))
  35. | lib_utils_oo_collect('openshift.common.hostname') | default([]) | join (',')
  36. }}"
  37. when:
  38. - openshift_http_proxy is defined or openshift_https_proxy is defined
  39. - openshift_generate_no_proxy_hosts | default(True) | bool
  40. - name: Initialize openshift.node.sdn_mtu
  41. openshift_facts:
  42. role: node
  43. local_facts:
  44. sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"