---

- name: install bench-server packages
  apt:
    force_apt_get: true
    name: "{{ bench_server_packages }}"
    state: present

- name: deploy bench-server service
  notify:
    - reload systemd daemon
    - restart bench-server
  template:
    src: bench-server.service.j2
    dest: /etc/systemd/system/bench-server.service

- name: ensure configuration directory exists
  file:
    path: /etc/mediaserver
    state: directory

- name: benchmark configuration settings
  notify:
    - restart bench-server
  copy:
    dest: /etc/mediaserver/bench.conf
    content: |
      BENCH_HOST=https://{{ bench_host }}
      BENCH_USER={{ bench_user }}
      BENCH_PASSWORD={{ bench_password }}
      BENCH_OID={{ bench_oid }}

- name: clone ms-testing-suite repository
  git:
    repo: "{{ bench_stream_repo }}"
    version: stable
    dest: /usr/share/ms-testing-suite
    update: false

- name: streaming configuration settings
  template:
    src: bench-streaming.conf.j2
    dest: /etc/mediaserver/bench-streaming.conf

...
