51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
- name: Create tt-rss directory
|
|
file:
|
|
path: /opt/tt-rss
|
|
state: directory
|
|
owner: "{{ docker_user.name }}"
|
|
mode: "{{ docker_compose_directory_mask }}"
|
|
become: true
|
|
|
|
- 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
|
|
|
|
- name: Install tt-rss compose file
|
|
template:
|
|
src: files/tt-rss/docker-compose.yml
|
|
dest: /opt/tt-rss/docker-compose.yml
|
|
mode: "{{ docker_compose_file_mask }}"
|
|
owner: "{{ docker_user.name }}"
|
|
validate: docker-compose -f %s config
|
|
register: compose_file
|
|
become: true
|
|
|
|
- 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
|
|
become_user: "{{ docker_user.name }}"
|
|
|
|
- name: Ensure plugins are owned by {{ docker_user.name }}
|
|
file:
|
|
path: "{{ plugins_dir.path }}"
|
|
state: directory
|
|
owner: "{{ docker_user.name }}"
|
|
mode: u=rwX,g=rwX,o=rX
|
|
recurse: true
|
|
become: true
|
|
when: fever_plugin.changed
|
|
|
|
- name: restart tt-rss
|
|
shell:
|
|
chdir: /opt/tt-rss
|
|
cmd: "{{ docker_update_command }}"
|
|
when: compose_file.changed or fever_plugin.changed
|