miniflux/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 08 Jan 2023 12:57:34 -0600
changeset 204 fd38efd8f637
parent 186 c48761176ede
permissions -rw-r--r--
Updated versions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: add miniflux user
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 163
diff changeset
     5
  user: name="miniflux" shell="/bin/false" system="yes" create_home="no"
130
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: download miniflux
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  get_url:
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    url: "{{miniflux_url}}"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/usr/local/bin/miniflux"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    owner: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
    group: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
    mode: "0755"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
- name: configure miniflux
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
  template:
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    src: "miniflux.conf.j2"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
    dest: "/etc/miniflux.conf"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
    owner: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    group: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
    mode: "0755"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
  notify: restart miniflux service
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
- name: install miniflux schema file
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
  template:
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
    src: "setup_db.psql.j2"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
    dest: "/tmp/setup_db_miniflux.psql"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
    owner: "postgres"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
    group: "postgres"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
    mode: "0600"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 130
diff changeset
    35
- name: install miniflux psql
130
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
  become_user: "postgres"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
  command: "psql -f /tmp/setup_db_miniflux.psql"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
  changed_when: false
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
- name: install systemd service
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
  copy:
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    44
    src: "miniflux.service"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    45
    dest: "/lib/systemd/system/miniflux.service"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    46
  notify: restart miniflux service
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
- name: ensure service is started
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
  systemd: name="miniflux.service" enabled="yes" state="started"