main.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. - fail:
  3. msg: Flannel can not be used with openshift sdn
  4. when: openshift_use_openshift_sdn | default(false) | bool and openshift_use_flannel | default(false) | bool
  5. - fail:
  6. msg: Nuage sdn can not be used with openshift sdn
  7. when: openshift_use_openshift_sdn | default(false) | bool and openshift_use_nuage | default(false) | bool
  8. - fail:
  9. msg: Nuage sdn can not be used with flannel
  10. when: openshift_use_flannel | default(false) | bool and openshift_use_nuage | default(false) | bool
  11. - fail:
  12. msg: openshift_hostname must be 64 characters or less
  13. when: openshift_hostname is defined and openshift_hostname | length > 64
  14. - name: Set common Cluster facts
  15. openshift_facts:
  16. role: common
  17. local_facts:
  18. cluster_id: "{{ openshift_cluster_id | default('default') }}"
  19. debug_level: "{{ openshift_debug_level | default(2) }}"
  20. hostname: "{{ openshift_hostname | default(None) }}"
  21. ip: "{{ openshift_ip | default(None) }}"
  22. public_hostname: "{{ openshift_public_hostname | default(None) }}"
  23. public_ip: "{{ openshift_public_ip | default(None) }}"
  24. use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
  25. sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
  26. deployment_type: "{{ openshift_deployment_type }}"
  27. use_fluentd: "{{ openshift_use_fluentd | default(None) }}"
  28. use_flannel: "{{ openshift_use_flannel | default(None) }}"
  29. use_nuage: "{{ openshift_use_nuage | default(None) }}"
  30. use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
  31. # For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
  32. # hostname by default.
  33. - set_fact:
  34. set_hostname_default: "{{ not openshift.common.version_greater_than_3_1_or_1_1 }}"
  35. - name: Set hostname
  36. hostname: name={{ openshift.common.hostname }}
  37. when: openshift_set_hostname | default(set_hostname_default) | bool