---

- name: Deploy configuration
  template: src=offen.conf.j2 dest={{ offen_root_dir }}/etc/offen.conf group={{ offen_user }} mode=640
  notify:
    - restart offen
  tags: offen

- name: Init database
  command: |
    {{ offen_root_dir }}/bin/offen setup -email admin@{{ ansible_domain }} -password password -name admin -envfile {{ offen_root_dir }}/etc/offen.conf
  when: offen_install_mode == 'install'
  tags: offen
