Compare commits

...

25 Commits

Author SHA1 Message Date
d28e2ea89a docs: alphabetical order for variables 2025-11-17 07:38:13 +01:00
f79501e4c8 docs: fix readme according to repo name when it's cloned 2025-11-17 07:11:17 +01:00
a79f5c7ee6 docs: update readme 2025-11-16 18:53:02 +01:00
618d186ea2 feat: add default for refresh interval 2025-11-16 18:52:59 +01:00
6245e4a16a feat: add retry logic to the download task 2025-11-16 18:47:17 +01:00
988bc7a0f5 feat: create freshrss_root_dir if it doesn't exist 2025-11-16 18:45:47 +01:00
e41eb07485 feat: more descriptive task 2025-11-16 18:44:04 +01:00
1efa0c24e8 docs: update example with freshrss_checksum 2025-11-16 18:27:01 +01:00
5e4cd968ec feat: prefix checksum with sha256 if freshrss_checksum is defined 2025-11-16 18:26:52 +01:00
872a787989 docs: update readme 2025-11-16 17:46:48 +01:00
52ac5aec24 feat: enable user to choose ownership of application directory 2025-11-16 17:46:36 +01:00
1eccbe5405 feat: default user and group 2025-11-16 17:46:19 +01:00
580b243bbf fix: typo 2025-11-16 17:45:39 +01:00
de3996172a docs: update readme 2025-11-16 17:44:58 +01:00
8a08b6c760 feat: checksum verification for downloaded archive 2025-11-16 17:44:49 +01:00
7ac2ba401c feat: add checksum default "" 2025-11-16 17:44:11 +01:00
adacdda404 fix: clean archive only if it's there 2025-11-16 17:39:48 +01:00
5318fb2304 fix: requirements format 2025-11-16 17:07:24 +01:00
0dd3dd299c docs: switch Required and Default column for standard 2025-11-16 17:06:42 +01:00
987a3e81cc docs: add requirements/dependencies 2025-11-16 16:57:36 +01:00
d2e6f186cf docs: standardize readme for future roles 2025-11-16 16:53:20 +01:00
762246f879 docs: one uniq example and a table for variables 2025-11-16 16:17:17 +01:00
835a46ae27 docs: update readme with precision 2025-11-16 15:41:28 +01:00
02d3e02919 docs: update readme 2025-11-16 15:39:11 +01:00
4686d0d5f5 feat: add default for freshrss_path 2025-11-16 15:39:06 +01:00
4 changed files with 59 additions and 22 deletions

View File

@@ -2,31 +2,52 @@
This role deploys [FreshRSS](https://www.freshrss.org/) to your server(s).
It **does not** deploy php, nor a webserver or a database. However, it does install the dependencies for FreshRSS, including php-sqlite3 in case you want to use a simple SQLite database.
It **does not** deploy php, nor a webserver or a database.
## Example playbook
However, it does install the PHP dependencies for FreshRSS, including php-sqlite3 in case you want to use a simple SQLite database.
## Requirements
- Ansible 2.10
- Deb-based distribution (Debian, Ubuntu, etc.)
## Dependencies
This role doesn't have any dependencies to other roles.
## Playbook example
```yaml
---
- name: Deploy FreshRSS
hosts: freshrss
hosts: freshrss_servers
become: true
vars:
freshrss_root_dir: "/var/www"
freshrss_version: "1.27.1"
freshrss_checksum: "99fd1d0e6f506832e6600c98e4c9369edad6bfec715df9b1b7c8c3eb6a455c22"
freshrss_refresh_interval: 10
roles:
- freshrss
- ansible-role-freshrss
```
## Example var file
## Variables
```yaml
freshrss_root_dir: "/var/www"
freshrss_path: "/var/www/rss"
freshrss_version: "1.27.1"
freshrss_refresh_interval: 15 # every 15 minutes
```
| Variable | Required | Default | Description |
| --------------------------- | -------- | ---------------------------------- | ---------------------------------------------------------------- |
| `freshrss_checksum` | No | `""` | SHA256 checksum to verify the archive if user sets it |
| `freshrss_group` | No | `www-data` | Group that will own FreshRSS files |
| `freshrss_path` | No | `{{ freshrss_root_dir }}/freshrss` | Web-accessible path where FreshRSS will be symlinked |
| `freshrss_refresh_interval` | No | `15` | Feed refresh interval in minutes (every X minutes) |
| `freshrss_root_dir` | **Yes** | - | Directory where FreshRSS archive is downloaded and extracted |
| `freshrss_user` | No | `www-data` | User that will own FreshRSS files and run the cron job |
| `freshrss_version` | **Yes** | - | FreshRSS version to deploy (e.g., `"1.27.1"`) |
## FreshRSS configuration
## Additional information
It's done once deployed, navigate to the address you’ve installed your server to complete the installation from the GUI.
FreshRSS configuration is to be done once deployed.
Navigate to the address you’ve installed your server to complete the installation from the GUI.
## License

6
defaults/main.yml Normal file
View File

@@ -0,0 +1,6 @@
---
freshrss_path: "{{ freshrss_root_dir }}/freshrss"
freshrss_checksum: ""
freshrss_user: www-data
freshrss_group: www-data
freshrss_refresh_interval: 15

View File

@@ -8,8 +8,11 @@
ansible.builtin.get_url:
url: https://github.com/FreshRSS/FreshRSS/archive/refs/tags/{{ freshrss_version }}.tar.gz
dest: "{{ freshrss_root_dir }}/freshrss-{{ freshrss_version }}.tar.gz"
mode: '0644'
mode: "0644"
checksum: "{{ 'sha256:' ~ freshrss_checksum if (freshrss_checksum | length > 0) else omit }}"
when: not freshrss_dir.stat.exists
retries: 3
delay: 5
- name: Uncompress FreshRSS
ansible.builtin.unarchive:
@@ -22,12 +25,13 @@
ansible.builtin.file:
name: "{{ freshrss_root_dir }}/freshrss-{{ freshrss_version }}.tar.gz"
state: absent
when: not freshrss_dir.stat.exists
- name: Give ownership to www-data
- name: Give ownership to user {{ freshrss_user }} and group {{ freshrss_group }}
ansible.builtin.file:
path: "{{ freshrss_root_dir }}/FreshRSS-{{ freshrss_version }}"
owner: www-data
group: www-data
owner: "{{ freshrss_user }}"
group: "{{ freshrss_group }}"
recurse: true
- name: Link the folder to web root on folder
@@ -38,16 +42,16 @@
follow: false
force: true
- name: Give ownership to www-data on link
- name: Give ownership to {{ freshrss_user }} on link
ansible.builtin.file:
path: "{{ freshrss_path }}"
owner: www-data
group: www-data
owner: "{{ freshrss_user }}"
group: "{{ freshrss_group }}"
follow: false
- name: Setup a cron to refresh feeds
ansible.builtin.cron:
name: update feeds
user: www-data
user: "{{ freshrss_user }}"
minute: "*/{{ freshrss_refresh_interval }}"
job: php -f {{ freshrss_path }}/app/actualize_script.php 1>/dev/null 2>&1

View File

@@ -1,4 +1,10 @@
---
- name: Create freshrss_root_dir if it doesn't exist
ansible.builtin.file:
path: "{{ freshrss_root_dir }}"
state: directory
mode: "0755"
- name: Install cron for automatic feed refresh
ansible.builtin.apt:
name: cron