---
- name: Miniflux package installed
  community.general.pkgng:
    name: "miniflux"
    state: latest

- name: Miniflux enabled
  shell: sysrc miniflux_enable="YES"
  notify: Miniflux restarted

- name: Miniflux config installed
  template:
    src: miniflux.conf.j2
    dest: /usr/local/etc/miniflux.env
    owner: root
    mode: 0644
  notify: Miniflux restarted

- name: Miniflux started
  service: name=miniflux state=started
