- name: install needed packages
  package: name={{ item }} state=present
  with_items:
  - basset
  tags:
  - basset
  - basset/worker

- name: install worker config
  template: src={{private}}/files/basset/worker.cfg.j2 dest=/etc/basset/worker.cfg
            mode=0600 owner=basset-worker group=basset-worker
  notify:
  - restart basset-worker
  tags:
  - basset
  - basset/worker

- name: hotfix basset-worker
  copy: src=basset-worker dest=/usr/bin/basset-worker owner=root group=root mode=0755
  tags:
  - hotfix
  - basset
  - basset/worker

- name: start basset worker
  service: name=basset-worker state=started enabled=yes
  tags:
  - basset
  - basset/worker
