You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.8KB

  1. ---
  2. _local_facts:
  3. database_password: "{% if not ansible_local.buildbot.database_password is defined %}{{ lookup('password', '/dev/null length=16 chars=ascii_letters') }}{% else %}{{ ansible_local.buildbot.database_password }}{% endif %}"
  4. workers: |-
  5. {
  6. {% for name in buildbot_workers.keys() %}
  7. {{name|to_json}}:
  8. {% if not buildbot_workers[name].password is defined %}
  9. {% if (not ansible_local.buildbot.workers[name] is defined) or (not ansible_local.buildbot.workers[name].password is defined) %}
  10. {{ {'password':lookup('password', '/dev/null length=16 chars=ascii_letters')} | to_json }}
  11. {% else %}
  12. {{ {'password':ansible_local.buildbot.workers[name].password} | to_json }}
  13. {% endif %}
  14. {% else %}
  15. {}
  16. {% endif %},
  17. {% endfor %}
  18. }
  19. buildbot_database_url: "postgresql://{{buildbot_db_user}}:{{buildbot_db_pass}}@localhost:5432/{{buildbot_db_name}}"
  20. buildbot_nginx_vhosts:
  21. - name: buildbot
  22. server_names:
  23. - "{{ buildbot_server_name }}"
  24. # from https://www.digitalocean.com/community/tutorials/how-to-configure-buildbot-with-ssl-using-an-nginx-reverse-proxy
  25. custom: |-
  26. location / {
  27. include proxy_params;
  28. proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
  29. }
  30. # Server sent event (sse) settings
  31. location /sse {
  32. proxy_buffering off;
  33. proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
  34. }
  35. # Websocket settings
  36. location /ws {
  37. proxy_http_version 1.1;
  38. proxy_set_header Upgrade $http_upgrade;
  39. proxy_set_header Connection "upgrade";
  40. proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
  41. proxy_read_timeout 6000s;
  42. }