|
- ---
- _local_facts:
- 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 %}"
- workers: |-
- {
- {% for name in buildbot_workers.keys() %}
- {{name|to_json}}:
- {% if not buildbot_workers[name].password is defined %}
- {% if (not ansible_local.buildbot.workers[name] is defined) or (not ansible_local.buildbot.workers[name].password is defined) %}
- {{ {'password':lookup('password', '/dev/null length=16 chars=ascii_letters')} | to_json }}
- {% else %}
- {{ {'password':ansible_local.buildbot.workers[name].password} | to_json }}
- {% endif %}
- {% else %}
- {}
- {% endif %},
- {% endfor %}
- }
-
- buildbot_database_url: "postgresql://{{buildbot_db_user}}:{{buildbot_db_pass}}@localhost:5432/{{buildbot_db_name}}"
-
- buildbot_nginx_vhosts:
- - name: buildbot
- server_names:
- - "{{ buildbot_server_name }}"
- # from https://www.digitalocean.com/community/tutorials/how-to-configure-buildbot-with-ssl-using-an-nginx-reverse-proxy
- custom: |-
- location / {
- include proxy_params;
- proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
- }
- # Server sent event (sse) settings
- location /sse {
- proxy_buffering off;
- proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
- }
-
- # Websocket settings
- location /ws {
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_pass http://unix:/run/buildbot/{{buildbot_server_name}}.www.sock;
- proxy_read_timeout 6000s;
- }
|