43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
---
|
|
- 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
|
|
|
|
- name: Ensure Invidious configuration folder exists in host
|
|
file:
|
|
path: /etc/invidious_container
|
|
state: directory
|
|
|
|
- name: Ensure Invidious configuration file exists in host
|
|
copy:
|
|
path: /etc/invidious_container/config.yml
|
|
content: "{{ invidious_config | to_yaml() }}"
|
|
backup: true
|
|
|
|
- name: Ensure Invidious composition is created
|
|
template:
|
|
src: templates/docker-compose.yml.j2
|
|
dest: "{{ invidious_folder }}/docker-compose.yml"
|
|
backup: true
|
|
|
|
- name: Ensure composition is up
|
|
community.docker.docker_compose:
|
|
project_name: "{{ invidious_project_name }}"
|
|
project_src: "{{ invidious_folder }}"
|
|
|
|
- name: Ensure UFW allows port access
|
|
ufw:
|
|
rule: allow
|
|
port: "{{ invidious_internal_port }}"
|
|
when: handle_ufw
|
|
|
|
- name: Ensure Invidious is restarted every hour
|
|
cron:
|
|
name: restart_invidious
|
|
job: "docker container restart {{ invidious_project_name }}_invidious_1"
|
|
minute: 56
|