Compare commits

...

No commits in common. "main" and "docs" have entirely different histories.
main ... docs

26 changed files with 576 additions and 1082 deletions

View File

@ -1,159 +0,0 @@
local PipelineLinting = {
kind: 'pipeline',
name: 'linting',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'ansible-later',
image: 'thegeeklab/ansible-later',
commands: [
'ansible-later',
],
},
{
name: 'python-format',
image: 'python:3.11',
environment: {
PY_COLORS: 1,
},
commands: [
'pip install -qq yapf',
'[ -z "$(find . -type f -name *.py)" ] || (yapf -rd ./)',
],
},
{
name: 'python-flake8',
image: 'python:3.11',
environment: {
PY_COLORS: 1,
},
commands: [
'pip install -qq flake8',
'flake8',
],
},
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineDeployment(scenario='rocky8') = {
kind: 'pipeline',
name: 'testing-' + scenario,
platform: {
os: 'linux',
arch: 'amd64',
},
concurrency: {
limit: 1,
},
workspace: {
base: '/drone/src',
path: '${DRONE_REPO_NAME}',
},
steps: [
{
name: 'ansible-molecule',
image: 'thegeeklab/molecule:4',
environment: {
HCLOUD_TOKEN: { from_secret: 'hcloud_token' },
},
commands: [
'molecule test -s ' + scenario,
],
},
],
depends_on: [
'linting',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
};
local PipelineDocumentation = {
kind: 'pipeline',
name: 'documentation',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'generate',
image: 'thegeeklab/ansible-doctor',
environment: {
ANSIBLE_DOCTOR_LOG_LEVEL: 'INFO',
ANSIBLE_DOCTOR_FORCE_OVERWRITE: true,
ANSIBLE_DOCTOR_EXCLUDE_FILES: 'molecule/',
ANSIBLE_DOCTOR_TEMPLATE: 'hugo-book',
ANSIBLE_DOCTOR_ROLE_NAME: '${DRONE_REPO_NAME#*.}',
ANSIBLE_DOCTOR_OUTPUT_DIR: '_docs/',
},
},
{
name: 'publish',
image: 'plugins/gh-pages',
settings: {
remote_url: 'https://gitea.rknet.org/ansible/${DRONE_REPO_NAME}',
netrc_machine: 'gitea.rknet.org',
username: { from_secret: 'gitea_username' },
password: { from_secret: 'gitea_token' },
pages_directory: '_docs/',
target_branch: 'docs',
},
when: {
ref: ['refs/heads/main'],
},
},
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
depends_on: [
'testing-rocky8',
],
};
local PipelineNotification = {
kind: 'pipeline',
name: 'notification',
platform: {
os: 'linux',
arch: 'amd64',
},
clone: {
disable: true,
},
steps: [
{
name: 'matrix',
image: 'thegeeklab/drone-matrix',
settings: {
homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' },
template: 'Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},
},
],
depends_on: [
'documentation',
],
trigger: {
status: ['success', 'failure'],
ref: ['refs/heads/main', 'refs/tags/**'],
},
};
[
PipelineLinting,
PipelineDeployment(scenario='rocky8'),
PipelineDocumentation,
PipelineNotification,
]

View File

@ -1,152 +0,0 @@
---
kind: pipeline
name: linting
platform:
os: linux
arch: amd64
steps:
- name: ansible-later
image: thegeeklab/ansible-later
commands:
- ansible-later
- name: python-format
image: python:3.11
commands:
- pip install -qq yapf
- "[ -z \"$(find . -type f -name *.py)\" ] || (yapf -rd ./)"
environment:
PY_COLORS: 1
- name: python-flake8
image: python:3.11
commands:
- pip install -qq flake8
- flake8
environment:
PY_COLORS: 1
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
kind: pipeline
name: testing-rocky8
platform:
os: linux
arch: amd64
concurrency:
limit: 1
workspace:
base: /drone/src
path: ${DRONE_REPO_NAME}
steps:
- name: ansible-molecule
image: thegeeklab/molecule:4
commands:
- molecule test -s rocky8
environment:
HCLOUD_TOKEN:
from_secret: hcloud_token
trigger:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- linting
---
kind: pipeline
name: documentation
platform:
os: linux
arch: amd64
steps:
- name: generate
image: thegeeklab/ansible-doctor
environment:
ANSIBLE_DOCTOR_EXCLUDE_FILES: molecule/
ANSIBLE_DOCTOR_FORCE_OVERWRITE: true
ANSIBLE_DOCTOR_LOG_LEVEL: INFO
ANSIBLE_DOCTOR_OUTPUT_DIR: _docs/
ANSIBLE_DOCTOR_ROLE_NAME: ${DRONE_REPO_NAME#*.}
ANSIBLE_DOCTOR_TEMPLATE: hugo-book
- name: publish
image: plugins/gh-pages
settings:
netrc_machine: gitea.rknet.org
pages_directory: _docs/
password:
from_secret: gitea_token
remote_url: https://gitea.rknet.org/ansible/${DRONE_REPO_NAME}
target_branch: docs
username:
from_secret: gitea_username
when:
ref:
- refs/heads/main
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- testing-rocky8
---
kind: pipeline
name: notification
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: matrix
image: thegeeklab/drone-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
username:
from_secret: matrix_username
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
depends_on:
- documentation
---
kind: signature
hmac: f44c85a6ceaa5033807c80b19ae186667223554fc4ba334e927b4fff9e5bd7c7
...

13
.gitignore vendored
View File

@ -1,13 +0,0 @@
# ---> Ansible
*.retry
plugins
library
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# ---> Docs
/_docs

View File

@ -1,19 +0,0 @@
---
ansible:
custom_modules:
- iptables_raw
- openssl_pkcs12
- proxmox_kvm
- ucr
- corenetworks_dns
- corenetworks_token
rules:
exclude_files:
- molecule/
- "LICENSE*"
- "**/*.md"
- "**/*.ini"
exclude_filter:
- LINT0009

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,12 +0,0 @@
# xoxys.freshrss
[![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Setup [FreshRSS](https://freshrss.org/) server. FreshRSS is a self-hosted RSS feed aggregator. It is lightweight, easy to work with, powerful, and customizable.
You can find the full documentation at [https://galaxy.geekdocs.de](https://galaxy.geekdocs.de/roles/cloud/freshrss/).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

View File

@ -1,107 +0,0 @@
---
freshrss_version: latest
freshrss_image: "quay.io/thegeeklab/freshrss:{{ freshrss_version }}"
# @var freshrss_base_url:description: >
# Specify address of the freshrss instance, used when building absolute urls, e.g. for websub.
# @end
freshrss_base_url: "http://localhost/"
freshrss_user: "freshrss"
freshrss_user_home: "/home/{{ freshrss_user }}"
freshrss_restart_policy: always
freshrss_service_stopped: False
freshrss_service_name: freshrss
# @var freshrss_volumes:description: > Define required docker volumes.
# @end
# @var freshrss_volumes:example: >
# freshrss_volumes:
# - name: data
# # target location inside the container
# dest: /var/www/app/data
# type: volume
# @end
freshrss_volumes:
- name: freshrss_data
dest: /var/www/app/data
- name: freshrss_extensions
dest: /var/www/app/extensions
freshrss_exposed_ports:
- "127.0.0.1:8080:8080/tcp"
# @var freshrss_memory_limit: $ "_unset_"
# @var freshrss_memory_limit:example: $ "512m"
# @var freshrss_memory_reservation: $ "_unset_"
# @var freshrss_memory_reservation:example: $ "256m"
# @var freshrss_cpu_quota: $ "_unset_"
# @var freshrss_cpu_quota:example: $ "25000"
freshrss_cap_add: []
freshrss_cap_drop: []
freshrss_security_opt:
- no-new-privileges
freshrss_pids_limit: "-1"
freshrss_healthcheck:
test: '["CMD", "/usr/local/bin/healthcheck"]'
interval: 30s
timeout: 5s
retries: 5
freshrss_default_user: "admin"
freshrss_default_password: "freshrss"
# @var freshrss_salt:description: >
# Salt is used to make crypto more unique. You can generate your own salt with
# e.g. `cat /proc/sys/kernel/random/uuid | sha1sum | awk '{print $1}'`.
# @end
# @var freshrss_salt: $ "_unset_"
freshrss_language: "en"
freshrss_title: "FreshRSS"
# @var freshrss_meta_description: $ "_unset_"
freshrss_allow_anonymous: False
freshrss_allow_anonymous_refresh: False
freshrss_auth_type: "form"
freshrss_api_enabled: False
freshrss_unsafe_autologin_enabled: False
freshrss_simplepie_syslog_enabled: True
freshrss_pubsubhubbub_enabled: False
freshrss_allow_robots: False
freshrss_allow_referrer: False
freshrss_limits_cookie_duration: "2592000"
freshrss_limits_cache_duration: "800"
freshrss_limits_timeout: "15"
freshrss_limits_max_inactivity: "10800"
freshrss_limits_max_feeds: "16384"
freshrss_limits_max_categories: "16384"
freshrss_limits_max_registrations: "1"
# @var freshrss_curlopt_ssl_verifyhost: $ "_unset_"
# @var freshrss_curlopt_ssl_verifypeer: $ "_unset_"
# @var freshrss_curlopt_proxytype: $ "_unset_"
# @var freshrss_curlopt_proxy: $ "_unset_"
# @var freshrss_curlopt_proxyport: $ "_unset_"
# @var freshrss_curlopt_proxyauth: $ "_unset_"
# @var freshrss_curlopt_proxyuserpwd: $ "_unset_"
# @var freshrss_extensions_enabled:description: >
# List of FreshRSS extensions to enable. Extensions must be already installed!
# @end
freshrss_extensions_enabled:
- "Tumblr-GDPR"
freshrss_db_type: sqlite
freshrss_db_server: localhost
freshrss_db_port: 5432
freshrss_db_name: freshrss
freshrss_db_user: freshrss
freshrss_db_password: secure
# @var freshrss_db_ssl_mode:description: This variable is only supported for `pgsql` DB type.
freshrss_db_ssl_mode: disable
# @var freshrss_db_ssl_mode:description: This variable is only supported for `pgsql` DB type.
freshrss_db_ssl_rootcert: /etc/ssl/certs/ca-certificates.crt

View File

@ -1,11 +0,0 @@
---
- name: Restart service
systemd:
name: "{{ __freshrss_pod_name }}.service"
scope: user
state: restarted
daemon_reload: True
enabled: True
listen: __freshrss_restart
become: True
become_user: "{{ freshrss_user }}"

576
index.md Normal file
View File

@ -0,0 +1,576 @@
---
title: freshrss
type: docs
---
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.freshrss) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.freshrss/src/branch/main/LICENSE)
Setup [FreshRSS](https://freshrss.org/) server. FreshRSS is a self-hosted RSS feed aggregator. It is lightweight, easy to work with, powerful, and customizable.
<!--more-->
- [Default Variables](#default-variables)
- [freshrss_allow_anonymous](#freshrss_allow_anonymous)
- [freshrss_allow_anonymous_refresh](#freshrss_allow_anonymous_refresh)
- [freshrss_allow_referrer](#freshrss_allow_referrer)
- [freshrss_allow_robots](#freshrss_allow_robots)
- [freshrss_api_enabled](#freshrss_api_enabled)
- [freshrss_auth_type](#freshrss_auth_type)
- [freshrss_base_url](#freshrss_base_url)
- [freshrss_cap_add](#freshrss_cap_add)
- [freshrss_cap_drop](#freshrss_cap_drop)
- [freshrss_cpu_quota](#freshrss_cpu_quota)
- [freshrss_curlopt_proxy](#freshrss_curlopt_proxy)
- [freshrss_curlopt_proxyauth](#freshrss_curlopt_proxyauth)
- [freshrss_curlopt_proxyport](#freshrss_curlopt_proxyport)
- [freshrss_curlopt_proxytype](#freshrss_curlopt_proxytype)
- [freshrss_curlopt_proxyuserpwd](#freshrss_curlopt_proxyuserpwd)
- [freshrss_curlopt_ssl_verifyhost](#freshrss_curlopt_ssl_verifyhost)
- [freshrss_curlopt_ssl_verifypeer](#freshrss_curlopt_ssl_verifypeer)
- [freshrss_db_name](#freshrss_db_name)
- [freshrss_db_password](#freshrss_db_password)
- [freshrss_db_port](#freshrss_db_port)
- [freshrss_db_server](#freshrss_db_server)
- [freshrss_db_ssl_mode](#freshrss_db_ssl_mode)
- [freshrss_db_ssl_rootcert](#freshrss_db_ssl_rootcert)
- [freshrss_db_type](#freshrss_db_type)
- [freshrss_db_user](#freshrss_db_user)
- [freshrss_default_password](#freshrss_default_password)
- [freshrss_default_user](#freshrss_default_user)
- [freshrss_exposed_ports](#freshrss_exposed_ports)
- [freshrss_extensions_enabled](#freshrss_extensions_enabled)
- [freshrss_healthcheck](#freshrss_healthcheck)
- [freshrss_image](#freshrss_image)
- [freshrss_language](#freshrss_language)
- [freshrss_limits_cache_duration](#freshrss_limits_cache_duration)
- [freshrss_limits_cookie_duration](#freshrss_limits_cookie_duration)
- [freshrss_limits_max_categories](#freshrss_limits_max_categories)
- [freshrss_limits_max_feeds](#freshrss_limits_max_feeds)
- [freshrss_limits_max_inactivity](#freshrss_limits_max_inactivity)
- [freshrss_limits_max_registrations](#freshrss_limits_max_registrations)
- [freshrss_limits_timeout](#freshrss_limits_timeout)
- [freshrss_memory_limit](#freshrss_memory_limit)
- [freshrss_memory_reservation](#freshrss_memory_reservation)
- [freshrss_meta_description](#freshrss_meta_description)
- [freshrss_pids_limit](#freshrss_pids_limit)
- [freshrss_pubsubhubbub_enabled](#freshrss_pubsubhubbub_enabled)
- [freshrss_restart_policy](#freshrss_restart_policy)
- [freshrss_salt](#freshrss_salt)
- [freshrss_security_opt](#freshrss_security_opt)
- [freshrss_service_name](#freshrss_service_name)
- [freshrss_service_stopped](#freshrss_service_stopped)
- [freshrss_simplepie_syslog_enabled](#freshrss_simplepie_syslog_enabled)
- [freshrss_title](#freshrss_title)
- [freshrss_unsafe_autologin_enabled](#freshrss_unsafe_autologin_enabled)
- [freshrss_user](#freshrss_user)
- [freshrss_user_home](#freshrss_user_home)
- [freshrss_version](#freshrss_version)
- [freshrss_volumes](#freshrss_volumes)
- [Dependencies](#dependencies)
---
## Default Variables
### freshrss_allow_anonymous
#### Default value
```YAML
freshrss_allow_anonymous: false
```
### freshrss_allow_anonymous_refresh
#### Default value
```YAML
freshrss_allow_anonymous_refresh: false
```
### freshrss_allow_referrer
#### Default value
```YAML
freshrss_allow_referrer: false
```
### freshrss_allow_robots
#### Default value
```YAML
freshrss_allow_robots: false
```
### freshrss_api_enabled
#### Default value
```YAML
freshrss_api_enabled: false
```
### freshrss_auth_type
#### Default value
```YAML
freshrss_auth_type: form
```
### freshrss_base_url
Specify address of the freshrss instance, used when building absolute urls, e.g. for websub.
#### Default value
```YAML
freshrss_base_url: http://localhost/
```
### freshrss_cap_add
#### Default value
```YAML
freshrss_cap_add: []
```
### freshrss_cap_drop
#### Default value
```YAML
freshrss_cap_drop: []
```
### freshrss_cpu_quota
#### Default value
```YAML
freshrss_cpu_quota: _unset_
```
#### Example usage
```YAML
freshrss_cpu_quota: '25000'
```
### freshrss_curlopt_proxy
#### Default value
```YAML
freshrss_curlopt_proxy: _unset_
```
### freshrss_curlopt_proxyauth
#### Default value
```YAML
freshrss_curlopt_proxyauth: _unset_
```
### freshrss_curlopt_proxyport
#### Default value
```YAML
freshrss_curlopt_proxyport: _unset_
```
### freshrss_curlopt_proxytype
#### Default value
```YAML
freshrss_curlopt_proxytype: _unset_
```
### freshrss_curlopt_proxyuserpwd
#### Default value
```YAML
freshrss_curlopt_proxyuserpwd: _unset_
```
### freshrss_curlopt_ssl_verifyhost
#### Default value
```YAML
freshrss_curlopt_ssl_verifyhost: _unset_
```
### freshrss_curlopt_ssl_verifypeer
#### Default value
```YAML
freshrss_curlopt_ssl_verifypeer: _unset_
```
### freshrss_db_name
#### Default value
```YAML
freshrss_db_name: freshrss
```
### freshrss_db_password
#### Default value
```YAML
freshrss_db_password: secure
```
### freshrss_db_port
#### Default value
```YAML
freshrss_db_port: 5432
```
### freshrss_db_server
#### Default value
```YAML
freshrss_db_server: localhost
```
### freshrss_db_ssl_mode
This variable is only supported for `pgsql` DB type.
#### Default value
```YAML
freshrss_db_ssl_mode: disable
```
### freshrss_db_ssl_rootcert
#### Default value
```YAML
freshrss_db_ssl_rootcert: /etc/ssl/certs/ca-certificates.crt
```
### freshrss_db_type
#### Default value
```YAML
freshrss_db_type: sqlite
```
### freshrss_db_user
#### Default value
```YAML
freshrss_db_user: freshrss
```
### freshrss_default_password
#### Default value
```YAML
freshrss_default_password: freshrss
```
### freshrss_default_user
#### Default value
```YAML
freshrss_default_user: admin
```
### freshrss_exposed_ports
#### Default value
```YAML
freshrss_exposed_ports:
- 127.0.0.1:8080:8080/tcp
```
### freshrss_extensions_enabled
List of FreshRSS extensions to enable. Extensions must be already installed!
#### Default value
```YAML
freshrss_extensions_enabled:
- Tumblr-GDPR
```
### freshrss_healthcheck
#### Default value
```YAML
freshrss_healthcheck:
test: '["CMD", "/usr/local/bin/healthcheck"]'
interval: 30s
timeout: 5s
retries: 5
```
### freshrss_image
#### Default value
```YAML
freshrss_image: quay.io/thegeeklab/freshrss:{{ freshrss_version }}
```
### freshrss_language
#### Default value
```YAML
freshrss_language: en
```
### freshrss_limits_cache_duration
#### Default value
```YAML
freshrss_limits_cache_duration: '800'
```
### freshrss_limits_cookie_duration
#### Default value
```YAML
freshrss_limits_cookie_duration: '2592000'
```
### freshrss_limits_max_categories
#### Default value
```YAML
freshrss_limits_max_categories: '16384'
```
### freshrss_limits_max_feeds
#### Default value
```YAML
freshrss_limits_max_feeds: '16384'
```
### freshrss_limits_max_inactivity
#### Default value
```YAML
freshrss_limits_max_inactivity: '10800'
```
### freshrss_limits_max_registrations
#### Default value
```YAML
freshrss_limits_max_registrations: '1'
```
### freshrss_limits_timeout
#### Default value
```YAML
freshrss_limits_timeout: '15'
```
### freshrss_memory_limit
#### Default value
```YAML
freshrss_memory_limit: _unset_
```
#### Example usage
```YAML
freshrss_memory_limit: 512m
```
### freshrss_memory_reservation
#### Default value
```YAML
freshrss_memory_reservation: _unset_
```
#### Example usage
```YAML
freshrss_memory_reservation: 256m
```
### freshrss_meta_description
#### Default value
```YAML
freshrss_meta_description: _unset_
```
### freshrss_pids_limit
#### Default value
```YAML
freshrss_pids_limit: '-1'
```
### freshrss_pubsubhubbub_enabled
#### Default value
```YAML
freshrss_pubsubhubbub_enabled: false
```
### freshrss_restart_policy
#### Default value
```YAML
freshrss_restart_policy: always
```
### freshrss_salt
Salt is used to make crypto more unique. You can generate your own salt with e.g. `cat /proc/sys/kernel/random/uuid | sha1sum | awk '{print $1}'`.
#### Default value
```YAML
freshrss_salt: _unset_
```
### freshrss_security_opt
#### Default value
```YAML
freshrss_security_opt:
- no-new-privileges
```
### freshrss_service_name
#### Default value
```YAML
freshrss_service_name: freshrss
```
### freshrss_service_stopped
#### Default value
```YAML
freshrss_service_stopped: false
```
### freshrss_simplepie_syslog_enabled
#### Default value
```YAML
freshrss_simplepie_syslog_enabled: true
```
### freshrss_title
#### Default value
```YAML
freshrss_title: FreshRSS
```
### freshrss_unsafe_autologin_enabled
#### Default value
```YAML
freshrss_unsafe_autologin_enabled: false
```
### freshrss_user
#### Default value
```YAML
freshrss_user: freshrss
```
### freshrss_user_home
#### Default value
```YAML
freshrss_user_home: /home/{{ freshrss_user }}
```
### freshrss_version
#### Default value
```YAML
freshrss_version: latest
```
### freshrss_volumes
> Define required docker volumes.
#### Default value
```YAML
freshrss_volumes:
- name: freshrss_data
dest: /var/www/app/data
- name: freshrss_extensions
dest: /var/www/app/extensions
```
#### Example usage
```YAML
freshrss_volumes:
- name: data
# target location inside the container
dest: /var/www/app/data
type: volume
```
## Dependencies
None.

View File

@ -1,30 +0,0 @@
# Standards: 0.2
---
galaxy_info:
# @meta author:value: [Robert Kaussow](https://gitea.rknet.org/xoxys)
author: Robert Kaussow <mail@thegeeklab.de>
namespace: xoxys
role_name: freshrss
# @meta description: >
# [![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.freshrss)
# [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss)
# [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.freshrss/src/branch/main/LICENSE)
#
# Setup [FreshRSS](https://freshrss.org/) server. FreshRSS is a self-hosted RSS feed aggregator.
# It is lightweight, easy to work with, powerful, and customizable.
# @end
description: Setup FreshRSS server
license: MIT
min_ansible_version: 2.10
platforms:
- name: EL
versions:
- 7
galaxy_tags:
- rss
- news
- freshrss
dependencies: []
collections:
- xoxys.general
- community.general

View File

@ -1 +0,0 @@
rocky8

View File

@ -1,3 +0,0 @@
[pytest]
filterwarnings =
ignore::DeprecationWarning

View File

@ -1,11 +0,0 @@
---
collections:
- name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v2.1.1/xoxys-general-2.1.1.tar.gz
- name: community.general
- name: containers.podman
roles:
- src: https://gitea.rknet.org/ansible/xoxys.podman
name: xoxys.podman
scm: git
version: main

View File

@ -1,7 +0,0 @@
---
- name: Converge
hosts: all
roles:
- role: xoxys.podman
- role: xoxys.freshrss

View File

@ -1,120 +0,0 @@
---
- name: Create
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
vars:
ssh_port: 22
ssh_user: root
ssh_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/ssh_key"
tasks:
- name: Create SSH key
user:
name: "{{ lookup('env', 'USER') }}"
generate_ssh_key: true
ssh_key_file: "{{ ssh_path }}"
force: true
register: generated_ssh_key
- name: Register the SSH key name
set_fact:
ssh_key_name: "molecule-generated-{{ 12345 | random | to_uuid }}"
- name: Register SSH key for test instance(s)
hcloud_ssh_key:
name: "{{ ssh_key_name }}"
public_key: "{{ generated_ssh_key.ssh_public_key }}"
state: present
- name: Create molecule instance(s)
hcloud_server:
name: "{{ item.name }}"
server_type: "{{ item.server_type }}"
ssh_keys:
- "{{ ssh_key_name }}"
image: "{{ item.image }}"
location: "{{ item.location | default(omit) }}"
datacenter: "{{ item.datacenter | default(omit) }}"
user_data: "{{ item.user_data | default(omit) }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: present
register: server
loop: "{{ molecule_yml.platforms }}"
async: 7200
poll: 0
- name: Wait for instance(s) creation to complete
async_status:
jid: "{{ item.ansible_job_id }}"
register: hetzner_jobs
until: hetzner_jobs.finished
retries: 300
loop: "{{ server.results }}"
- name: Create volume(s)
hcloud_volume:
name: "{{ item.name }}"
server: "{{ item.name }}"
location: "{{ item.location | default(omit) }}"
size: "{{ item.volume_size | default(10) }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: "present"
loop: "{{ molecule_yml.platforms }}"
when: item.volume | default(False) | bool
register: volumes
async: 7200
poll: 0
- name: Wait for volume(s) creation to complete
async_status:
jid: "{{ item.ansible_job_id }}"
register: hetzner_volumes
until: hetzner_volumes.finished
retries: 300
when: volumes.changed
loop: "{{ volumes.results }}"
# Mandatory configuration for Molecule to function.
- name: Populate instance config dict
set_fact:
instance_conf_dict:
{
"instance": "{{ item.hcloud_server.name }}",
"ssh_key_name": "{{ ssh_key_name }}",
"address": "{{ item.hcloud_server.ipv4_address }}",
"user": "{{ ssh_user }}",
"port": "{{ ssh_port }}",
"identity_file": "{{ ssh_path }}",
"volume": "{{ item.item.item.volume | default(False) | bool }}",
}
loop: "{{ hetzner_jobs.results }}"
register: instance_config_dict
when: server.changed | bool
- name: Convert instance config dict to a list
set_fact:
instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}"
when: server.changed | bool
- name: Dump instance config
copy:
content: |
# Molecule managed
{{ instance_conf | to_nice_yaml(indent=2) }}
dest: "{{ molecule_instance_config }}"
when: server.changed | bool
- name: Wait for SSH
wait_for:
port: "{{ ssh_port }}"
host: "{{ item.address }}"
search_regex: SSH
delay: 10
loop: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
- name: Wait for VM to settle down
pause:
seconds: 30

View File

@ -1,78 +0,0 @@
---
- name: Destroy
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
- name: Check existing instance config file
stat:
path: "{{ molecule_instance_config }}"
register: cfg
- name: Populate the instance config
set_fact:
instance_conf: "{{ (lookup('file', molecule_instance_config) | from_yaml) if cfg.stat.exists else [] }}"
- name: Destroy molecule instance(s)
hcloud_server:
name: "{{ item.instance }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: absent
register: server
loop: "{{ instance_conf }}"
async: 7200
poll: 0
- name: Wait for instance(s) deletion to complete
async_status:
jid: "{{ item.ansible_job_id }}"
register: hetzner_jobs
until: hetzner_jobs.finished
retries: 300
loop: "{{ server.results }}"
- pause:
seconds: 5
- name: Destroy volume(s)
hcloud_volume:
name: "{{ item.instance }}"
server: "{{ item.instance }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: "absent"
register: volumes
loop: "{{ instance_conf }}"
when: item.volume | default(False) | bool
async: 7200
poll: 0
- name: Wait for volume(s) deletion to complete
async_status:
jid: "{{ item.ansible_job_id }}"
register: hetzner_volumes
until: hetzner_volumes.finished
retries: 300
when: volumes.changed
loop: "{{ volumes.results }}"
- name: Remove registered SSH key
hcloud_ssh_key:
name: "{{ instance_conf[0].ssh_key_name }}"
state: absent
when: (instance_conf | default([])) | length > 0
# Mandatory configuration for Molecule to function.
- name: Populate instance config
set_fact:
instance_conf: {}
- name: Dump instance config
copy:
content: |
# Molecule managed
{{ instance_conf | to_nice_yaml(indent=2) }}
dest: "{{ molecule_instance_config }}"
when: server.changed | bool

View File

@ -1,24 +0,0 @@
---
dependency:
name: galaxy
options:
role-file: molecule/requirements.yml
requirements-file: molecule/requirements.yml
env:
ANSIBLE_GALAXY_DISPLAY_PROGRESS: "false"
driver:
name: delegated
platforms:
- name: rocky8-freshrss
image: rocky-8
server_type: cx11
lint: |
/usr/local/bin/flake8
provisioner:
name: ansible
env:
ANSIBLE_FILTER_PLUGINS: ${ANSIBLE_FILTER_PLUGINS:-./plugins/filter}
ANSIBLE_LIBRARY: ${ANSIBLE_LIBRARY:-./library}
log: False
verifier:
name: testinfra

View File

@ -1,15 +0,0 @@
---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Bootstrap python for Ansible
raw: |
command -v python3 python || (
(test -e /usr/bin/dnf && sudo dnf install -y python3) ||
(test -e /usr/bin/apt && (apt -y update && apt install -y python-minimal)) ||
(test -e /usr/bin/yum && sudo yum -y -qq install python3) ||
echo "Warning: Python not boostrapped due to unknown platform."
)
become: true
changed_when: false

View File

@ -1,28 +0,0 @@
import json
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
def test_freshrss_running(host):
container = host.run("sudo su - freshrss /bin/sh -c 'podman inspect freshrss'")
state = json.loads(container.stdout)
assert state[0]["State"]["Running"] is True
def test_freshrss_socket(host):
# Verify the socket is listening for HTTP traffic
assert host.socket("tcp://127.0.0.1:8080").is_listening
def test_freshrss_conn_error(host):
code = int(host.run("curl -s -w '%{http_code}' http://127.0.0.1:8080/ -o /dev/null").stdout)
body = host.run("curl -sX GET http://127.0.0.1:8080/").stdout
assert code == 200
assert "FreshRSS" in body

View File

@ -1,12 +0,0 @@
[flake8]
ignore = D100, D101, D102, D103, D105, D107, E402, W503
max-line-length = 99
inline-quotes = double
exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env*
[yapf]
based_on_style = google
column_limit = 99
dedent_closing_brackets = true
coalesce_brackets = true
split_before_logical_operator = true

View File

@ -1,2 +0,0 @@
---
- include_tasks: setup.yml

View File

@ -1,84 +0,0 @@
---
- block:
- name: Create systemd service user
user:
name: "{{ freshrss_user }}"
comment: "FreshRSS service user managed by Ansible"
create_home: True
home: "{{ freshrss_user_home }}"
password: "!"
state: present
- name: Enable lingering for systemd user
command:
cmd: "loginctl enable-linger {{ freshrss_user }}"
creates: "/var/lib/systemd/linger/{{ freshrss_user }}"
- name: Create required directories
file:
path: "{{ item }}"
state: directory
owner: "{{ freshrss_user }}"
group: "{{ freshrss_user }}"
mode: 0700
loop:
- "{{ __freshrss_systemd_user_dir }}"
- "{{ __freshrss_systemd_env_dir }}"
- name: Deploy environment file
template:
src: systemd/environments/freshrss.env.j2
dest: "{{ __freshrss_systemd_env_dir }}/freshrss.env"
owner: "{{ freshrss_user }}"
group: "{{ freshrss_user }}"
mode: 0600
notify:
- __freshrss_restart
- name: Create systemd service files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ freshrss_user }}"
group: "{{ freshrss_user }}"
mode: "0644"
loop:
- src: systemd/user/freshrss-container.service.j2
dest: "{{ __freshrss_systemd_user_dir }}/{{ __freshrss_container_name }}.service"
- src: systemd/user/freshrss-pod.service.j2
dest: "{{ __freshrss_systemd_user_dir }}/{{ __freshrss_pod_name }}.service"
loop_control:
label: "{{ item.dest }}"
notify:
- __freshrss_restart
become: True
become_user: root
- name: Create container volumes
containers.podman.podman_volume:
name: "{{ item.name }}"
state: "{{ item.state | default('present') }}"
loop: "{{ freshrss_volumes }}"
loop_control:
label: "{{ item.name }}"
when: item.type | default("volume") | lower == "volume"
register: __freshrss_volumes_raw
become: True
become_user: "{{ freshrss_user }}"
- name: Register container volumes map
set_fact:
__freshrss_volumes_map: "{{ __freshrss_volumes_raw.results | json_query('[].volume') | items2dict(key_name='Name', value_name='Mountpoint') }}"
- name: Flush handlers
meta: flush_handlers
- name: Ensure service is up and running
systemd:
name: "{{ __freshrss_pod_name }}.service"
scope: user
state: started
daemon_reload: True
enabled: True
become: True
become_user: "{{ freshrss_user }}"

View File

@ -1,67 +0,0 @@
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
FRESHRSS_ENVIRONMENT=production
{% if freshrss_salt is defined and freshrss_salt %}
FRESHRSS_SALT={{ freshrss_salt }}
{% endif %}
FRESHRSS_BASE_URL={{ freshrss_base_url }}
FRESHRSS_LANGUAGE={{ freshrss_language }}
FRESHRSS_TITLE={{ freshrss_title }}
{% if freshrss_meta_description is defined and freshrss_meta_description %}
FRESHRSS_META_DESCRIPTION={{ freshrss_meta_description }}
{% endif %}
FRESHRSS_DEFAULT_USER={{ freshrss_default_user }}
FRESHRSS_DEFAULT_PASSWORD={{ freshrss_default_password }}
FRESHRSS_ALLOW_ANONYMOUS={{ freshrss_allow_anonymous | bool | lower }}
FRESHRSS_ALLOW_ANONYMOUS_REFRESH={{ freshrss_allow_anonymous_refresh | bool | lower }}
FRESHRSS_AUTH_TYPE={{ freshrss_auth_type }}
FRESHRSS_API_ENABLED={{ freshrss_api_enabled | bool | lower }}
FRESHRSS_UNSAFE_AUTOLOGIN_ENABLED={{ freshrss_unsafe_autologin_enabled | bool | lower }}
FRESHRSS_SIMPLEPIE_SYSLOG_ENABLED={{ freshrss_simplepie_syslog_enabled | bool | lower }}
FRESHRSS_PUBSUBHUBBUB_ENABLED={{ freshrss_pubsubhubbub_enabled | bool | lower }}
FRESHRSS_ALLOW_ROBOTS={{ freshrss_allow_robots | bool | lower }}
FRESHRSS_ALLOW_REFERRER={{ freshrss_allow_referrer | bool | lower }}
FRESHRSS_LIMITS_COOKIE_DURATION={{ freshrss_limits_cookie_duration }}
FRESHRSS_LIMITS_CACHE_DURATION={{ freshrss_limits_cache_duration }}
FRESHRSS_LIMITS_TIMEOUT={{ freshrss_limits_timeout }}
FRESHRSS_LIMITS_MAX_INACTIVITY={{ freshrss_limits_max_inactivity }}
FRESHRSS_LIMITS_MAX_FEEDS={{ freshrss_limits_max_feeds }}
FRESHRSS_LIMITS_MAX_CATEGORIES={{ freshrss_limits_max_categories }}
FRESHRSS_LIMITS_MAX_REGISTRATIONS={{ freshrss_limits_max_registrations }}
{% if freshrss_curlopt_ssl_verifyhost is defined and freshrss_curlopt_ssl_verifyhost %}
FRESHRSS_CURLOPT_SSL_VERIFYHOST={{ freshrss_curlopt_ssl_verifyhost }}
{% endif %}
{% if freshrss_curlopt_ssl_verifypeer is defined and freshrss_curlopt_ssl_verifypeer %}
FRESHRSS_CURLOPT_SSL_VERIFYPEER={{ freshrss_curlopt_ssl_verifypeer }}
{% endif %}
{% if freshrss_curlopt_proxytype is defined and freshrss_curlopt_proxytype %}
FRESHRSS_CURLOPT_PROXYTYPE={{ freshrss_curlopt_proxytype }}
{% endif %}
{% if freshrss_curlopt_proxy is defined and freshrss_curlopt_proxy %}
FRESHRSS_CURLOPT_PROXY={{ freshrss_curlopt_proxy }}
{% endif %}
{% if freshrss_curlopt_proxyport is defined and freshrss_curlopt_proxyport %}
FRESHRSS_CURLOPT_PROXYPORT={{ freshrss_curlopt_proxyport }}
{% endif %}
{% if freshrss_curlopt_proxyauth is defined and freshrss_curlopt_proxyauth %}
FRESHRSS_CURLOPT_PROXYAUTH={{ freshrss_curlopt_proxyauth }}
{% endif %}
{% if freshrss_curlopt_proxyuserpwd is defined and freshrss_curlopt_proxyuserpwd %}
FRESHRSS_CURLOPT_PROXYUSERPWD={{ freshrss_curlopt_proxyuserpwd }}
{% endif %}
FRESHRSS_DB_TYPE={{ freshrss_db_type }}
{% if freshrss_db_type != "sqlite" %}
{% if freshrss_db_type == "pgsql" %}
FRESHRSS_DB_HOST={{ freshrss_db_server }};sslmode={{ freshrss_db_ssl_mode }}
FRESHRSS_POSTGRES_SSL_ROOTCERT={{ freshrss_db_ssl_rootcert }}
{% else %}
FRESHRSS_DB_HOST={{ freshrss_db_server }}
{% endif %}
FRESHRSS_DB_PORT={{ freshrss_db_port }}
FRESHRSS_DB_USER={{ freshrss_db_user }}
FRESHRSS_DB_PASSWORD={{ freshrss_db_password }}
FRESHRSS_DB_BASE={{ freshrss_db_name }}
FRESHRSS_DB_PREFIX=freshrss_
{% endif %}
FRESHRSS_EXTENSIONS_ENABLED={{ freshrss_extensions_enabled | join(',') }}

View File

@ -1,65 +0,0 @@
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=FreshRSS App Server
Wants=network.target network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
Requires=dbus.socket
BindsTo={{ __freshrss_pod_name }}.service
After={{ __freshrss_pod_name }}.service
[Service]
Type=notify
NotifyAccess=all
Environment=PODMAN_SYSTEMD_UNIT=%N
SyslogIdentifier=%N
LogExtraFields=CONTAINER_NAME=%N
Delegate=memory pids
Restart=on-failure
TimeoutSec=70
ExecStartPre=/usr/bin/podman pod exists {{ __freshrss_pod_name }}
ExecStart=/usr/bin/podman run \
--rm \
--replace \
--detach \
--restart=no \
--cgroups=no-conmon \
--sdnotify=conmon \
--env-file={{ __freshrss_systemd_env_dir }}/freshrss.env \
--pod {{ __freshrss_pod_name }} \
{% if freshrss_memory_limit is defined %}
--memory={{ freshrss_memory_limit }} \
{% endif %}
{% if freshrss_memory_reservation is defined %}
-memory-reservation={{ freshrss_memory_reservation }} \
{% endif %}
{% if freshrss_cpu_quota is defined %}
--cpu-quota={{ freshrss_cpu_quota }} \
{% endif %}
{% for item in freshrss_security_opt %}
--security-opt={{ item }} \
{% endfor %}
{% for item in freshrss_cap_add %}
--cap-add={{ item }} \
{% endfor %}
{% for item in freshrss_cap_drop %}
--cap-drop={{ item }} \
{% endfor %}
--pids-limit={{ freshrss_pids_limit }} \
{% for volume in freshrss_volumes %}
--mount 'type={{ volume.type | default("volume") | lower }},src={{ volume.name }},target={{ volume.dest }}' \
{% endfor %}
--name={{ __freshrss_container_name }} \
{{ freshrss_image }}
ExecStop=/usr/bin/podman stop --ignore {{ __freshrss_container_name }}
ExecStopPost=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
[Install]
WantedBy=multi-user.target default.target

View File

@ -1,35 +0,0 @@
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=FreshRSS Pod
Wants=network.target network-online.target
After=network-online.target
RequiresMountsFor=
Requires=dbus.socket {{ __freshrss_container_name }}.service
Before={{ __freshrss_container_name }}.service
[Service]
Type=forking
Environment=PODMAN_SYSTEMD_UNIT=%N
SyslogIdentifier=%N
LogExtraFields=CONTAINER_NAME=%N
Delegate=memory pids
Restart=on-failure
TimeoutSec=70
ExecStartPre=/usr/bin/podman pod create \
--replace \
{% for port in freshrss_exposed_ports %}
--publish {{ port }} \
{% endfor %}
--share ipc,net,uts \
--name {{ __freshrss_pod_name }}
ExecStart=/usr/bin/podman pod start {{ __freshrss_pod_name }}
ExecStop=/usr/bin/podman pod stop --ignore -t 10 {{ __freshrss_pod_name }}
[Install]
WantedBy=multi-user.target default.target

View File

@ -1,6 +0,0 @@
---
__freshrss_systemd_user_dir: "{{ freshrss_user_home }}/.config/systemd/user"
__freshrss_systemd_env_dir: "{{ freshrss_user_home }}/.config/systemd/environments"
__freshrss_container_name: "{{ freshrss_service_name }}"
__freshrss_pod_name: "{{ freshrss_service_name }}-pod"