---
dependencies:
- base

- role: packages
  packages:
    - elasticsearch5
    - logstash
    - kibana5
    - go  # for oauth2-proxy

- role: user
  user_id: "{{ worker_account }}"
  user_name: Buildbot Worker Account

- role: supervisor-service
  service_name: "oauth2_proxy"
  service_dir: "{{ getent_passwd[worker_account].4 }}"
  service_command: /usr/local/bin/oauth2_proxy -config {{ oauth2_proxy_configuration }}
  service_user: "{{ worker_account }}"
  service_environment: "{{ proxy_env }}"

- role: nginx
  nginx_template: multiproxy
  upstream_urls:
      - endpoint: /events
        url: "{{ internal_ip }}:{{ logstash_port }}"
      # elastic_search_direct_url is in the vault. Allow admins to access the data directly from internet
      - endpoint: /{{ elastic_search_direct_url }}/
        url: "{{ internal_ip }}:{{ elastic_port }}/"
      - endpoint: /
        url: "{{ internal_ip }}:{{ oauth2_proxy_port }}"

  ssl: true

---
dependencies:
- base

- role: packages
  packages:
    - elasticsearch6
    - logstash
    - kibana6
    - go  # for oauth2-proxy

- role: user
  user_id: "{{ worker_account }}"
  user_name: Buildbot Worker Account

- role: supervisor-service
  service_name: "oauth2_proxy"
  service_dir: "{{ getent_passwd[worker_account].4 }}"
  service_command: /usr/local/bin/oauth2_proxy -config {{ oauth2_proxy_configuration }}
  service_user: "{{ worker_account }}"
  service_environment: "{{ proxy_env }}"

- role: nginx
  nginx_template: multiproxy
  upstream_urls:
      - endpoint: /events
        url: "{{ internal_ip }}:{{ logstash_port }}"
      # elastic_search_direct_url is in the vault. Allow admins to access the data directly from internet
      - endpoint: /{{ elastic_search_direct_url }}/
        url: "{{ internal_ip }}:{{ elastic_port }}/"
      - endpoint: /
        url: "{{ internal_ip }}:{{ oauth2_proxy_port }}"

  ssl: true

Update to Kibana 6 and Elasticsearch 6
Update to Kibana 6 and Elasticsearch 6
