Compare commits

...

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

22 changed files with 627 additions and 1016 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='centos7') = {
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-centos7',
],
};
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='centos7'),
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-centos7
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 centos7
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-centos7
---
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: 84c6e466b5a3d367c55f0459171244cfe254b1e5851bc6c6052ed52e110d80c5
...

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_docker
[![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss_docker?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss_docker)
[![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_docker/).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

View File

@ -1,129 +0,0 @@
---
freshrss_version: latest
freshrss_image: "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_service_directory: /var/lib/docker/services/freshrss
freshrss_container_name: freshrss
freshrss_restart_policy: always
freshrss_service_stopped: False
# @var freshrss_networks:example: >
# freshrss_networks:
# - name: default
# # optional network driver, defaults to 'bride'
# driver: host
# @end
freshrss_networks:
- name: default
freshrss_networks_applied:
- default
# @var freshrss_volumes:description: > Define required docker volumes.
# @end
# @var freshrss_volumes:example: >
# freshrss_volumes:
# # Instead of the name you could specify a path on the container host system,
# # but you also have to enable bind mount for this volume
# - name: data
# # target location inside the container
# dest: /var/www/app/data
# # enable bind mount, if false volume will be configured as named volume
# # keep in mind you MUST set bind in any case
# bind: True
# @end
freshrss_volumes:
- name: data
dest: /var/www/app/data
bind: False
- name: extensions
dest: /var/www/app/extensions
bind: False
freshrss_exposed_ports:
- "127.0.0.1:8080:8080"
freshrss_extra_hosts: []
# @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_shares: $ "_unset_"
# @var freshrss_cpu_shares:example: $ "1024"
freshrss_cap_add: []
freshrss_cap_drop: []
freshrss_security_opt: []
# @var freshrss_pids_limit: $ "_unset_"
# @var freshrss_healthcheck: $ "_unset_"
# @var freshrss_healthcheck:example: >
# freshrss_healthcheck:
# test: '["CMD", "/usr/local/bin/healthcheck"]'
# interval: 30s
# timeout: 5s
# retries: 5
# @end
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_trusted_sources:
- 127.0.0.0/8
- ::1/128
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

627
index.md Normal file
View File

@ -0,0 +1,627 @@
---
title: freshrss_docker
type: docs
---
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.freshrss_docker) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss_docker?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss_docker) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.freshrss_docker/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_container_name](#freshrss_container_name)
- [freshrss_cpu_shares](#freshrss_cpu_shares)
- [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_extra_hosts](#freshrss_extra_hosts)
- [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_networks](#freshrss_networks)
- [freshrss_networks_applied](#freshrss_networks_applied)
- [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_directory](#freshrss_service_directory)
- [freshrss_service_stopped](#freshrss_service_stopped)
- [freshrss_simplepie_syslog_enabled](#freshrss_simplepie_syslog_enabled)
- [freshrss_title](#freshrss_title)
- [freshrss_trusted_sources](#freshrss_trusted_sources)
- [freshrss_unsafe_autologin_enabled](#freshrss_unsafe_autologin_enabled)
- [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_container_name
#### Default value
```YAML
freshrss_container_name: freshrss
```
### freshrss_cpu_shares
#### Default value
```YAML
freshrss_cpu_shares: _unset_
```
#### Example usage
```YAML
freshrss_cpu_shares: '1024'
```
### 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
```
### freshrss_extensions_enabled
List of FreshRSS extensions to enable. Extensions must be already installed!
#### Default value
```YAML
freshrss_extensions_enabled:
- Tumblr-GDPR
```
### freshrss_extra_hosts
#### Default value
```YAML
freshrss_extra_hosts: []
```
### freshrss_healthcheck
#### Default value
```YAML
freshrss_healthcheck: _unset_
```
#### Example usage
```YAML
freshrss_healthcheck:
test: '["CMD", "/usr/local/bin/healthcheck"]'
interval: 30s
timeout: 5s
retries: 5
```
### freshrss_image
#### Default value
```YAML
freshrss_image: 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_networks
#### Default value
```YAML
freshrss_networks:
- name: default
```
#### Example usage
```YAML
freshrss_networks:
- name: default
# optional network driver, defaults to 'bride'
driver: host
```
### freshrss_networks_applied
#### Default value
```YAML
freshrss_networks_applied:
- default
```
### freshrss_pids_limit
#### Default value
```YAML
freshrss_pids_limit: _unset_
```
### 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: []
```
### freshrss_service_directory
#### Default value
```YAML
freshrss_service_directory: /var/lib/docker/services/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_trusted_sources
#### Default value
```YAML
freshrss_trusted_sources:
- 127.0.0.0/8
- ::1/128
```
### freshrss_unsafe_autologin_enabled
#### Default value
```YAML
freshrss_unsafe_autologin_enabled: false
```
### freshrss_version
#### Default value
```YAML
freshrss_version: latest
```
### freshrss_volumes
> Define required docker volumes.
#### Default value
```YAML
freshrss_volumes:
- name: data
dest: /var/www/app/data
bind: false
- name: extensions
dest: /var/www/app/extensions
bind: false
```
#### Example usage
```YAML
freshrss_volumes:
# Instead of the name you could specify a path on the container host system,
# but you also have to enable bind mount for this volume
- name: data
# target location inside the container
dest: /var/www/app/data
# enable bind mount, if false volume will be configured as named volume
# keep in mind you MUST set bind in any case
bind: True
```
## 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_docker
# @meta description: >
# [![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.freshrss_docker)
# [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.freshrss_docker?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.freshrss_docker)
# [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.freshrss_docker/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,14 +0,0 @@
---
- name: Converge
hosts: all
environment:
PYTHONPATH: /opt/python2/ansible-deps/lib/python2.7/site-packages
vars:
dockerengine_packages_extra:
- epel-release
- python-pip
- python-virtualenv
roles:
- role: xoxys.docker_engine
- role: xoxys.freshrss_docker

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: centos7-freshrss
image: centos-7
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,26 +0,0 @@
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):
freshrss = host.docker("freshrss")
assert freshrss.is_running
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 -sL -w '%{http_code}' http://127.0.0.1:8080/ -o /dev/null").stdout)
body = host.run("curl -sLX GET http://127.0.0.1:8080/").stdout
assert code == 200
assert "Login · FreshRSS" in body

View File

@ -1 +0,0 @@
centos7

View File

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

View File

@ -1,10 +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
roles:
- src: https://gitea.rknet.org/ansible/xoxys.docker_engine.git
name: xoxys.docker_engine
scm: git
version: main

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,26 +0,0 @@
---
- block:
- name: Ensure service directory exists
file:
path: "{{ freshrss_service_directory }}"
state: directory
mode: 0755
- name: Deploy compose file to '{{ freshrss_service_directory }}'
template:
src: "services/freshrss_compose.yml.j2"
dest: "{{ freshrss_service_directory }}/docker-compose.yml"
owner: root
group: root
mode: 0640
validate: "docker-compose -f %s config -q"
- name: Ensure service is up and running
docker_compose:
project_src: "{{ freshrss_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ freshrss_service_stopped }}"
state: present
become: True
become_user: root

View File

@ -1,150 +0,0 @@
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
version: "2.4"
services:
freshrss:
container_name: {{ freshrss_container_name }}
image: {{ freshrss_image }}
restart: {{ freshrss_restart_policy }}
{% if freshrss_exposed_ports | default([]) %}
ports:
{% for port in freshrss_exposed_ports %}
- {{ port | quote }}
{% endfor %}
{% endif %}
{% if freshrss_volumes | default([]) %}
volumes:
{% for volume in freshrss_volumes %}
- "{{ volume.name }}:{{ volume.dest }}"
{% endfor %}
{% endif %}
{% if freshrss_networks_applied | default([]) %}
networks:
{% for network in freshrss_networks_applied %}
- {{ network }}
{% endfor %}
{% endif %}
{% if freshrss_extra_hosts | default([]) %}
extra_hosts:
{% for host in freshrss_extra_hosts %}
- {{ host | quote }}
{% endfor %}
{% endif %}
environment:
- 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(',') }}
- FRESHRSS_TRUSTED_SOURCES={{ freshrss_trusted_sources | join(',') }}
{% if freshrss_memory_limit is defined %}
mem_limit: {{ freshrss_memory_limit }}
{% endif %}
{% if freshrss_memory_reservation is defined %}
mem_reservation: {{ freshrss_memory_reservation }}
{% endif %}
{% if freshrss_cpu_shares is defined %}
cpu_shares: {{ freshrss_cpu_shares }}
{% endif %}
{% if not freshrss_cap_add | length == 0 %}
cap_add:
{% for item in freshrss_cap_add %}
- {{ item }}
{% endfor %}
{% endif %}
{% if not freshrss_cap_drop | length == 0 %}
cap_drop:
{% for item in freshrss_cap_drop %}
- {{ item }}
{% endfor %}
{% endif %}
{% if not freshrss_security_opt | length == 0 %}
security_opt:
{% for item in freshrss_security_opt %}
- {{ item }}
{% endfor %}
{% endif %}
{% if freshrss_healthcheck is defined %}
healthcheck:
{% for key, value in freshrss_healthcheck.items() %}
{{ key }}: {{ value }}
{% endfor %}
{% endif %}
{% if freshrss_pids_limit is defined %}
pids_limit: {{ freshrss_pids_limit }}
{% endif %}
{% if freshrss_volumes | default([]) | rejectattr("bind") | list | length > 0 %}
volumes:
{% for volume in freshrss_volumes | rejectattr("bind") %}
{{ volume.name }}:
{% endfor %}
{% endif %}
{% if freshrss_networks | default([]) | length > 0 %}
networks:
{% for network in freshrss_networks %}
{{ network.name }}:
driver: {{ network.backend | default("bridge") }}
{% endfor %}
{% endif %}