src.nth.io/

summaryrefslogtreecommitdiff
path: root/miniflux/tasks/main.yaml
blob: 333bef9556f9264a95712b317c94477b58f47738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---

# The package's dbconfig-common hook would create its own database; preseed
# it off since this role manages the db and config itself.
- name: preseed dbconfig to skip the package db setup
  become: yes
  debconf:
    name: "miniflux"
    question: "miniflux/dbconfig-install"
    vtype: "boolean"
    value: "false"

# The package creates the miniflux user and ships the systemd unit, which
# runs /usr/bin/miniflux -c /etc/miniflux/miniflux.conf as user miniflux.
- name: install miniflux
  become: yes
  apt: name="miniflux"

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

- 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
  no_log: true

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