DEBOPS.MINIFLUX(5)

NAME
debops.miniflux - Manage Miniflux with Ansible

SYNOPSIS

debops run service/miniflux [--limit group,host,...] [--diff] [--check] [--tags tag1,tag2,...] [--skip-tags tag1,tag2,...] [<ansible-playbook options>] ...

debops check service/miniflux [--limit group,host,...] [--tags tag1,tag2,...] [--skip-tags tag1,tag2,...] [<ansible-playbook options>] ...

DESCRIPTION

Miniflux <https://miniflux.app/> is a minimalist, web-based feed reader written in Go. It uses PostgreSQL as the backend database and can be deployed behind nginx webserver as a self-hosted application. The debops.miniflux Ansible role can be used to deploy Miniflux on a host managed by DebOps.

GETTING STARTED

  Installation methods

The default installation method will be using an upstream APT repository, configured by the debops.keyring Ansible role. The debops.golang manages the actual installation and provides an option to install from a precombined binary or from the source code as well. You can use the miniflux__upstream_type variable to select the desired installation method.

Miniflux requires the embed library, which was introduced in Go 1.16 <https://tip.golang.org/doc/go1.16#library-embed>. Debian Bullseye comes with Go 1.15, therefore installation from source will not be possible by default. Newer Go is available via the bullseye-backports repository, so it is possible to build Miniflux using the backported Golang packages.

  Steps required after installation

After Miniflux is installed, you should be able to access it on the miniflux.<domain> address through the web browser. The default address can be defined using the miniflux__fqdn variable.

To access the service, you will need to create the initial administrator account (done interactively, so not automated at this point). To do that, you have to login to the server, and using the root UNIX account run the command:

miniflux -c /etc/miniflux.conf -create-admin

After providing an username and password, you can login to Miniflux using the provided credentials via the web interface. Additional user accounts can be created in the web UI.

  Example inventory

To install the Miniflux service on a host, it needs to be included in the [debops_service_miniflux] Ansible inventory group. You also need to configure a PostgreSQL service as a backend, it can be deployed on the same or a different host.

Example Ansible inventory:

[debops_all_hosts]
hostname
[debops_service_postgresql_server]
hostname
[debops_service_miniflux]
hostname

  Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.miniflux role:

---
# SPDX-License-Identifier: GPL-3.0-only
- name: Manage Miniflux service
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_miniflux' ]
  become: True
  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'
  roles:
    - role: keyring
      tags: [ 'role::keyring', 'skip::keyring', 'role::golang' ]
      keyring__dependent_apt_keys:
        - '{{ miniflux__keyring__dependent_apt_keys }}'
      keyring__dependent_gpg_user: '{{ golang__keyring__dependent_gpg_user }}'
      keyring__dependent_gpg_keys:
        - '{{ nginx__keyring__dependent_apt_keys }}'
        - '{{ golang__keyring__dependent_gpg_keys }}'
      golang__dependent_packages:  # noqa var-naming[no-role-prefix]
        - '{{ miniflux__golang__dependent_packages }}'
    - role: postgresql
      tags: [ 'role::postgresql', 'skip::postgresql' ]
      postgresql__dependent_roles:
        - '{{ miniflux__postgresql__dependent_roles }}'
      postgresql__dependent_groups:
        - '{{ miniflux__postgresql__dependent_groups }}'
      postgresql__dependent_databases:
        - '{{ miniflux__postgresql__dependent_databases }}'
      postgresql__dependent_extensions:
        - '{{ miniflux__postgresql__dependent_extensions }}'
      postgresql__dependent_pgpass:
        - '{{ miniflux__postgresql__dependent_pgpass }}'
    - role: apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ golang__apt_preferences__dependent_list }}'
        - '{{ nginx__apt_preferences__dependent_list }}'
    - role: etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ miniflux__etc_services__dependent_list }}'
    - role: ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'
    - role: python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ nginx__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ nginx__python__dependent_packages2 }}'
    - role: nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_servers:
        - '{{ miniflux__nginx__dependent_servers }}'
      nginx__dependent_upstreams:
        - '{{ miniflux__nginx__dependent_upstreams }}'
    - role: golang
      tags: [ 'role::golang', 'skip::golang' ]
      golang__dependent_packages:
        - '{{ miniflux__golang__dependent_packages }}'
    - role: miniflux
      tags: [ 'role::miniflux', 'skip::miniflux' ]

  Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after a host was first configured to speed up playbook execution, when you are sure that most of the configuration is already in the desired state.

Available role tags:

role::miniflux
    Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.

DEFAULT VARIABLE DETAILS

Some of debops.miniflux default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

  miniflux__configuration

The miniflux__*_configuration variables define the contents of the /etc/miniflux.conf configuration file. You can find information about available configuration options in Miniflux online documentation <https://miniflux.app/docs/configuration.html>.

The role uses Universal Configuration system to integrate the default and inventory variables during configuration file generation.

  Examples

You can see the default configuration defined in the role in miniflux__default_configuration variable to see examples of various configuration options.

  Syntax

The variables are defined as lists of YAML dictionaries, each entry defines a configuration option using specific parameters:

name
    Required. Name of the variable to define in the configuration file, automatically converted to uppercase. Configuration entries with the same name parameter are merged together and can affect each other.

comment
    Optional. String or YAML text block with a comment about a given configuration option.

value
    The value of a given configuration option. It can be a string, a number, a boolean variable or a YAML list which will be converted to strings separated by space.

raw If the raw parameter is specified, the name and value parameters are not included in the generated configuration file. The contents of the raw parameter (string or YAML text block) will be included in the generated configuration file as-is. You can use Jinja inside of the raw parameter to augment generated configuration as needed.

state
    Optional. If not specified or present, a given configuration option will be included in the generated file. If absent, a given configuration option will not be included in the finished file. If comment, the option will be included but commented out. If ignore, a given configuration entry will not be evaluated during role execution.

separator
    Optional. Add an empty line before a given configuration option, for aesthetic purposes.

AUTHOR
Berkhan Berkdemir

COPYRIGHT
2014-2024, Maciej Delmanowski, Nick Janetakis, Robin Schneider and others