cluster_facts.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. tasks:
  9. - name: Gather Cluster facts
  10. openshift_facts:
  11. role: common
  12. local_facts:
  13. deployment_type: "{{ openshift_deployment_type }}"
  14. deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}"
  15. hostname: "{{ openshift_hostname | default(None) }}"
  16. ip: "{{ openshift_ip | default(None) }}"
  17. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  18. public_ip: "{{ openshift_public_ip | default(None) }}"
  19. portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
  20. http_proxy: "{{ openshift_http_proxy | default(None) }}"
  21. https_proxy: "{{ openshift_https_proxy | default(None) }}"
  22. no_proxy: "{{ openshift_no_proxy | default(None) }}"
  23. generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
  24. - name: Set fact of no_proxy_internal_hostnames
  25. openshift_facts:
  26. role: common
  27. local_facts:
  28. no_proxy_internal_hostnames: "{{ hostvars | lib_utils_oo_select_keys(groups['oo_nodes_to_config']
  29. | union(groups['oo_masters_to_config'])
  30. | union(groups['oo_etcd_to_config'] | default([])))
  31. | lib_utils_oo_collect('openshift.common.hostname') | default([]) | join (',')
  32. }}"
  33. when:
  34. - openshift_http_proxy is defined or openshift_https_proxy is defined
  35. - openshift_generate_no_proxy_hosts | default(True) | bool
  36. - name: Initialize openshift.node.sdn_mtu
  37. openshift_facts:
  38. role: node
  39. local_facts:
  40. sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"