main.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ---
  2. - name: Set haproxy frontend port
  3. openshift_facts:
  4. role: loadbalancer
  5. local_facts:
  6. frontend_port: "{{ openshift_master_api_port | default(None) }}"
  7. - name: Set loadbalancer facts
  8. openshift_facts:
  9. role: loadbalancer
  10. local_facts:
  11. limit_nofile: "{{ openshift_loadbalancer_limit_nofile | default(None) }}"
  12. default_maxconn: "{{ openshift_loadbalancer_default_maxconn | default(None) }}"
  13. global_maxconn: "{{ openshift_loadbalancer_global_maxconn | default(None) }}"
  14. frontends:
  15. - name: atomic-openshift-api
  16. mode: tcp
  17. options:
  18. - tcplog
  19. binds:
  20. - "*:{{ openshift.loadbalancer.frontend_port }}"
  21. default_backend: atomic-openshift-api
  22. - name: nuage-monitor
  23. mode: tcp
  24. options:
  25. - tcplog
  26. binds:
  27. - "*:{{ nuage_mon_rest_server_port }}"
  28. default_backend: nuage-monitor
  29. when: openshift.common.use_nuage | bool
  30. backends:
  31. - name: atomic-openshift-api
  32. mode: tcp
  33. option: tcplog
  34. balance: source
  35. servers: "{{ hostvars
  36. | oo_select_keys(groups['oo_masters'])
  37. | oo_haproxy_backend_masters(openshift.loadbalancer.frontend_port) }}"
  38. - name: nuage-monitor
  39. mode: tcp
  40. option: tcplog
  41. balance: source
  42. servers: "{{ hostvars
  43. | oo_select_keys(groups['oo_masters'])
  44. | oo_haproxy_backend_masters(nuage_mon_rest_server_port) }}"
  45. when: openshift.common.use_nuage | bool