- name: Clone source repo ansible.builtin.git: repo: https://github.com/iv-org/invidious.git dest: "{{ docker_dir }}/invidious" single_branch: yes version: master - name: Generate HMAC key command: openssl rand -hex 32 register: invidious_hmac_key_result - set_fact: invidious_hmac_key: "{{ invidious_hmac_key_result.stdout }}" - name: Set up invidious config.yml template: src: "conf/config.yml.j2" dest: "{{ docker_dir }}/invidious/config.yml" owner: 1000 group: 1000 mode: 0755 - name: Set up invidious nginx.conf template: src: "conf/nginx.conf.j2" dest: "{{ docker_dir }}/invidious/nginx.conf" owner: 1000 group: 1000 mode: 0755 - name: Create ytproxy directory file: path: "{{ docker_dir }}/invidious/opt" state: directory owner: 33 group: 33 mode: 0755 become: true - name: Create ytproxy directory file: path: "{{ docker_dir }}/invidious/opt/http3-ytproxy" state: directory owner: 33 group: 33 mode: 0755 become: true # - name: vultr cron on reboot # cron: # name: "Rotating IPv6 address on Invidious" # special_time: "reboot" # job: 'sleep 30s && docker run --rm --privileged --name smart-ipv6-rotator --network host quay.io/invidious/smart-ipv6-rotator:latest run --ipv6range=2001:19f0:4400:2e62::/64 && curl -H prio:low -d "Rotate IPv6 address successful" https://ntfy.opnxng.com/cron || curl -H tags:warning -H prio:high -d "Rotate IPv6 address failed!" https://ntfy.opnxng.com/cron;' # user: root # become: true # when: # - inventory_hostname == 'vultr' # # - name: vultr cron twice a day # cron: # name: "Rotating IPv6 address on Invidious" # minute: "0" # hour: "*/12" # job: 'sleep 30s && docker run --rm --privileged --name smart-ipv6-rotator --network host quay.io/invidious/smart-ipv6-rotator:latest run --ipv6range=2001:19f0:4400:2e62::/64 && curl -H prio:low -d "Rotate IPv6 address successful" https://ntfy.opnxng.com/cron || curl -H tags:warning -H prio:high -d "Rotate IPv6 address failed!" https://ntfy.opnxng.com/cron;' # user: root # become: true # when: # - inventory_hostname == 'vultr' # # - name: vultr cron # cron: # name: "Restart Invidious hourly" # special_time: "hourly" # job: 'docker restart invidious' # user: root # become: true # when: # - inventory_hostname == 'vultr'