---

- name: install bench-worker packages
  apt:
    force_apt_get: true
    name: "{{ bench_worker_packages }}"
    state: present

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

- name: benchmark configuration settings
  copy:
    dest: /etc/mediaserver/bench-conf.json
    content: |
      {
      "LOCUST_HOST":"{{ bench_server }}",
      "MS_HOST":"{{ bench_host }}",
      "MS_USERNAME":"{{ bench_user }}",
      "MS_PASSWORD":"{{ bench_password }}",
      "MEDIA_OID":"{{ bench_oid }}",
      "TIME_STATS":{{ bench_time_stat }}
      }

- name: reload systemd daemon
  systemd:
    daemon_reload: true

- name: restart bench-worker
  systemd:
    name: bench-worker
    state: restarted

...
