main.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. debug_level: "{{ openshift_debug_level | default(2) }}"
  19. install_examples: "{{ openshift_install_examples | default(True) }}"
  20. use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
  21. sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
  22. use_flannel: "{{ openshift_use_flannel | default(None) }}"
  23. use_nuage: "{{ openshift_use_nuage | default(None) }}"
  24. use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
  25. data_dir: "{{ openshift_data_dir | default(None) }}"
  26. use_dnsmasq: "{{ openshift_use_dnsmasq | default(None) }}"
  27. - name: Install the base package for versioning
  28. action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }} state=present"
  29. when: not openshift.common.is_containerized | bool
  30. - name: Set version facts
  31. openshift_facts:
  32. # For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
  33. # hostname by default.
  34. - set_fact:
  35. set_hostname_default: "{{ not openshift.common.version_gte_3_1_or_1_1 }}"
  36. - name: Set hostname
  37. command: >
  38. hostnamectl set-hostname {{ openshift.common.hostname }}
  39. when: openshift_set_hostname | default(set_hostname_default) | bool