miniflux/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 03 Jul 2021 11:13:02 -0500
changeset 154 436cd9b3ee0b
parent 130 46785fdb4fc5
child 163 40b78af86337
permissions -rw-r--r--
Made ops templated.
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
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  user: name="miniflux" system="yes" create_home="no"
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
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
- name: install pleroma psql
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
    owner: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
    group: "root"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
    mode: "0755"
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
  notify: restart miniflux service
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    51
- name: ensure service is started
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    52
  become: yes
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    53
  systemd: name="miniflux.service" enabled="yes" state="started"