2023-11-08 19:46:16 +00:00
|
|
|
- name: Include tt-rss variables
|
|
|
|
include_vars: tt-rss.yml
|
|
|
|
|
2020-02-09 12:43:38 +00:00
|
|
|
- name: Create tt-rss directory
|
|
|
|
file:
|
2020-03-25 21:27:15 +00:00
|
|
|
path: /opt/tt-rss
|
2020-02-09 12:43:38 +00:00
|
|
|
state: directory
|
|
|
|
owner: "{{ docker_user.name }}"
|
|
|
|
mode: "{{ docker_compose_directory_mask }}"
|
|
|
|
become: true
|
|
|
|
|
2020-11-25 13:00:06 +00:00
|
|
|
- name: Create tt-rss plugins directory
|
|
|
|
file:
|
|
|
|
path: /opt/tt-rss/plugins
|
|
|
|
state: directory
|
|
|
|
owner: "{{ docker_user.name }}"
|
|
|
|
mode: "{{ docker_compose_directory_mask }}"
|
|
|
|
register: plugins_dir
|
|
|
|
become: true
|
|
|
|
|
2020-02-09 12:43:38 +00:00
|
|
|
- name: Install tt-rss compose file
|
|
|
|
template:
|
|
|
|
src: files/tt-rss/docker-compose.yml
|
2020-03-25 21:27:15 +00:00
|
|
|
dest: /opt/tt-rss/docker-compose.yml
|
2020-02-09 12:43:38 +00:00
|
|
|
mode: "{{ docker_compose_file_mask }}"
|
|
|
|
owner: "{{ docker_user.name }}"
|
2021-02-07 15:59:18 +00:00
|
|
|
validate: docker-compose -f %s config
|
2020-02-09 12:43:38 +00:00
|
|
|
register: compose_file
|
|
|
|
become: true
|
|
|
|
|
2020-11-25 13:00:06 +00:00
|
|
|
- name: Install fever plugin
|
|
|
|
git:
|
|
|
|
repo: https://github.com/DigitalDJ/tinytinyrss-fever-plugin
|
|
|
|
dest: "{{ plugins_dir.path }}/fever"
|
|
|
|
depth: 1
|
|
|
|
register: fever_plugin
|
|
|
|
become: true
|
2023-02-23 21:50:34 +00:00
|
|
|
become_user: "{{ docker_user.name }}"
|
2020-11-25 13:00:06 +00:00
|
|
|
|
2023-11-08 19:46:16 +00:00
|
|
|
- name: Install OIDC plugin
|
|
|
|
git:
|
|
|
|
repo: https://git.tt-rss.org/fox/ttrss-auth-oidc.git
|
|
|
|
dest: "{{ plugins_dir.path }}/auth_oidc"
|
|
|
|
depth: 1
|
|
|
|
register: oidc_plugin
|
|
|
|
become: true
|
|
|
|
become_user: "{{ docker_user.name }}"
|
|
|
|
|
2020-11-25 13:00:06 +00:00
|
|
|
- name: Ensure plugins are owned by {{ docker_user.name }}
|
|
|
|
file:
|
|
|
|
path: "{{ plugins_dir.path }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ docker_user.name }}"
|
2021-02-07 16:14:56 +00:00
|
|
|
mode: u=rwX,g=rwX,o=rX
|
2020-11-25 13:00:06 +00:00
|
|
|
recurse: true
|
|
|
|
become: true
|
2023-11-08 19:46:16 +00:00
|
|
|
when: fever_plugin.changed or oidc_plugin.changed
|
2020-11-25 13:00:06 +00:00
|
|
|
|
2020-06-28 20:13:12 +01:00
|
|
|
- name: restart tt-rss
|
|
|
|
shell:
|
|
|
|
chdir: /opt/tt-rss
|
|
|
|
cmd: "{{ docker_update_command }}"
|
2023-11-08 19:46:16 +00:00
|
|
|
when: compose_file.changed or fever_plugin.changed or oidc_plugin.changed
|