2022-12-27 16:07:19 +01:00
|
|
|
---
|
2022-12-27 16:36:24 +01:00
|
|
|
- name: Add Invidious vhosts to list
|
|
|
|
set_fact:
|
|
|
|
vhosts: "{{ vhosts + invidious_vhosts }}"
|
|
|
|
|
|
|
|
- name: Ensure Apache virtual host is configured
|
|
|
|
ansible.builtin.import_role:
|
|
|
|
name: apache_ssl_vhosts
|
|
|
|
when: handle_apache2_reverse_proxy
|
2022-12-27 16:07:19 +01:00
|
|
|
|
2022-12-27 16:53:36 +01:00
|
|
|
- name: Ensure Invidious composition is created
|
2022-12-27 16:07:19 +01:00
|
|
|
template:
|
|
|
|
src: templates/docker-compose.yml.j2
|
|
|
|
dest: "{{ invidious_folder }}/docker-compose.yml"
|
|
|
|
backup: yes
|
2022-12-27 16:14:36 +01:00
|
|
|
|
2022-12-27 16:45:26 +01:00
|
|
|
- name: Ensure composition is up
|
|
|
|
community.docker.docker_compose:
|
2022-12-28 08:57:07 +01:00
|
|
|
project_name: "{{ invidious_project_name }}"
|
2022-12-27 16:45:26 +01:00
|
|
|
project_src: "{{ invidious_folder }}"
|
|
|
|
|
2022-12-27 16:23:45 +01:00
|
|
|
- name: Ensure UFW allows port access
|
|
|
|
ufw:
|
|
|
|
rule: allow
|
|
|
|
port: "{{ invidious_internal_port }}"
|
|
|
|
when: handle_ufw
|
2022-12-28 08:57:07 +01:00
|
|
|
|
|
|
|
- name: Ensure Invidious is restarted every hour
|
|
|
|
cron:
|
|
|
|
name: restart_invidious
|
|
|
|
job: "docker container restart {{ invidious_project_name }}_invidious_1"
|
|
|
|
minute: 56
|