miniflux/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 18 Jul 2021 20:26:54 -0500
changeset 165 00e0af8e76a4
parent 163 40b78af86337
child 174 431c6d5e5dd4
permissions -rw-r--r--
Fixed backup script error.

---

- name: add miniflux user
  become: yes
  user: name="miniflux" system="yes" create_home="no"

- name: download miniflux
  become: yes
  get_url:
    url: "{{miniflux_url}}"
    dest: "/usr/local/bin/miniflux"
    owner: "root"
    group: "root"
    mode: "0755"

- name: configure miniflux
  become: yes
  template:
    src: "miniflux.conf.j2"
    dest: "/etc/miniflux.conf"
    owner: "root"
    group: "root"
    mode: "0755"
  notify: restart miniflux service

- name: install miniflux schema file
  become: yes
  template:
    src: "setup_db.psql.j2"
    dest: "/tmp/setup_db_miniflux.psql"
    owner: "postgres"
    group: "postgres"
    mode: "0600"

- name: install miniflux psql
  become: yes
  become_user: "postgres"
  command: "psql -f /tmp/setup_db_miniflux.psql"
  changed_when: false

- name: install systemd service
  become: yes
  copy:
    src: "miniflux.service"
    dest: "/lib/systemd/system/miniflux.service"
    owner: "root"
    group: "root"
    mode: "0755"
  notify: restart miniflux service

- name: ensure service is started
  become: yes
  systemd: name="miniflux.service" enabled="yes" state="started"