Compare commits

..

9 Commits

4 changed files with 20 additions and 10 deletions

View File

@@ -25,22 +25,23 @@ This role doesn't have any dependencies to other roles.
vars: vars:
freshrss_root_dir: "/var/www" freshrss_root_dir: "/var/www"
freshrss_version: "1.27.1" freshrss_version: "1.27.1"
freshrss_refresh_interval: 15 freshrss_checksum: "99fd1d0e6f506832e6600c98e4c9369edad6bfec715df9b1b7c8c3eb6a455c22"
freshrss_refresh_interval: 10
roles: roles:
- freshrss - ansible-role-freshrss
``` ```
## Variables ## Variables
| Variable | Required | Default | Description | | Variable | Required | Default | Description |
| --------------------------- | -------- | ---------------------------------- | ---------------------------------------------------------------- | | --------------------------- | -------- | ---------------------------------- | ---------------------------------------------------------------- |
| `freshrss_root_dir` | **Yes** | - | Directory where FreshRSS archive is downloaded and extracted |
| `freshrss_path` | No | `{{ freshrss_root_dir }}/freshrss` | Web-accessible path where FreshRSS will be symlinked |
| `freshrss_version` | **Yes** | - | FreshRSS version to deploy (e.g., `"1.27.1"`) |
| `freshrss_refresh_interval` | **Yes** | - | Feed refresh interval in minutes (e.g., `15` = every 15 minutes) |
| `freshrss_checksum` | No | `""` | SHA256 checksum to verify the archive if user sets it | | `freshrss_checksum` | No | `""` | SHA256 checksum to verify the archive if user sets it |
| `freshrss_user` | No | `www-data` | User that will own FreshRSS files and run the cron job |
| `freshrss_group` | No | `www-data` | Group that will own FreshRSS files | | `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"`) |
## Additional information ## Additional information

View File

@@ -3,3 +3,4 @@ freshrss_path: "{{ freshrss_root_dir }}/freshrss"
freshrss_checksum: "" freshrss_checksum: ""
freshrss_user: www-data freshrss_user: www-data
freshrss_group: www-data freshrss_group: www-data
freshrss_refresh_interval: 15

View File

@@ -8,9 +8,11 @@
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://github.com/FreshRSS/FreshRSS/archive/refs/tags/{{ freshrss_version }}.tar.gz url: https://github.com/FreshRSS/FreshRSS/archive/refs/tags/{{ freshrss_version }}.tar.gz
dest: "{{ freshrss_root_dir }}/freshrss-{{ freshrss_version }}.tar.gz" dest: "{{ freshrss_root_dir }}/freshrss-{{ freshrss_version }}.tar.gz"
mode: '0644' mode: "0644"
checksum: "{{ freshrss_checksum if (freshrss_checksum | length > 0) else omit }}" checksum: "{{ 'sha256:' ~ freshrss_checksum if (freshrss_checksum | length > 0) else omit }}"
when: not freshrss_dir.stat.exists when: not freshrss_dir.stat.exists
retries: 3
delay: 5
- name: Uncompress FreshRSS - name: Uncompress FreshRSS
ansible.builtin.unarchive: ansible.builtin.unarchive:
@@ -25,7 +27,7 @@
state: absent state: absent
when: not freshrss_dir.stat.exists when: not freshrss_dir.stat.exists
- name: Give ownership to {{ freshrss_user }} - name: Give ownership to user {{ freshrss_user }} and group {{ freshrss_group }}
ansible.builtin.file: ansible.builtin.file:
path: "{{ freshrss_root_dir }}/FreshRSS-{{ freshrss_version }}" path: "{{ freshrss_root_dir }}/FreshRSS-{{ freshrss_version }}"
owner: "{{ freshrss_user }}" owner: "{{ freshrss_user }}"

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 - name: Install cron for automatic feed refresh
ansible.builtin.apt: ansible.builtin.apt:
name: cron name: cron