---
- name: install needed packages
  package: name=regindexer state=installed
  tags:
  - packages
  - regindexer

- name: make sure regindexer owns it's own files
  file: path=/var/lib/regindexer recurse=yes owner=regindexer group=regindexer
  tags:
  - regindexer

- name: Install config.yaml file
  template: src=config.yaml dest=/etc/regindexer/config.yaml 
  tags:
  - regindexer

- name: enable service
  service: name=regindexer state=started enabled=true
  tags:
  - regindexer
