---

- name: Deploy prosody configuration
  template: src={{ item.src }} dest={{ item.dest }} owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
  loop:
    - src: prosody.cfg.lua.j2
      dest: /etc/prosody/prosody.cfg.lua
      group: prosody
      mode: 640
  notify: reload prosody
  tags: prosody

# TODO: support vhosts
