main.yml 1.0 KB

123456789101112131415161718192021222324252627282930
  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. backends:
  23. - name: atomic-openshift-api
  24. mode: tcp
  25. option: tcplog
  26. balance: source
  27. servers: "{{ hostvars
  28. | oo_select_keys(groups['oo_masters'])
  29. | oo_haproxy_backend_masters(openshift.loadbalancer.frontend_port) }}"