---
- name: "copy mbstat.tar.gz"
  copy:
    src: mbstat.tar.gz
    dest: "{{ billing.dirs.tmp }}/mbstat.tar.gz"
    mode: 0644

- name: "unpack mbstat.tar.gz"
  unarchive:
    src: "{{ billing.dirs.tmp }}/mbstat.tar.gz"
    dest: "{{ mbstat.dirs.production }}/public"
    extra_opts: [--strip-components=1]

- name: "add updater"
  template:
    src: mbstat_update.sh
    dest: "{{ billing.dirs.updates }}/mbstat/mbstat_update.sh"
    mode: 0755

- name: "add mysql socket script"
  template:
    src: mbstat_mysql_socket.sh
    dest: "{{ billing.dirs.contrib }}/mbstat/scripts/mbstat_mysql_socket.sh"
    mode: 0755
