---
- name: 0bin rc file installed
  ansible.builtin.copy:
    src: zerobin.rc
    dest: /usr/local/etc/rc.d/zerobin
    mode: a+x

- name: 0bin enabled
  shell: sysrc zerobin_enable="YES"

- name: 0bin latest release fetched
  get_url:
    url: https://github.com/Tygs/0bin/releases/download/v1.0.5/zerobin.pyz
    dest: /usr/local/bin/zerobin.pyz
  notify: Zerobin restarted

- name: 0bin started
  service: name=zerobin state=started
