|
@@ -0,0 +1,35 @@
|
|
|
+---
|
|
|
+- name: Create yt-dlp docker dir
|
|
|
+ ansible.builtin.file:
|
|
|
+ path: /opt/docker/yt-dlp
|
|
|
+ state: directory
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: '0755'
|
|
|
+
|
|
|
+- name: Add yt-dlp Dockerfiles
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: "{{ item.src }}"
|
|
|
+ dest: /opt/docker/yt-dlp/{{ item.dest }}
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: '0644'
|
|
|
+ with_items:
|
|
|
+ - { src: "Dockerfile.j2", dest: "Dockerfile" }
|
|
|
+ - { src: "yt-dlp.conf", dest: "yt-dlp.conf" }
|
|
|
+
|
|
|
+- name: Add yt-dlp script
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: yt-dlp.j2
|
|
|
+ dest: /usr/local/bin/yt-dlp
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: '0755'
|
|
|
+
|
|
|
+- name: Add update-yt-dlp alias
|
|
|
+ ansible.builtin.lineinfile:
|
|
|
+ path: /root/.bashrc
|
|
|
+ regexp: "^alias update-yt-dlp="
|
|
|
+ line: "alias update-yt-dlp='cd /root/docker/yt-dlp ; docker build . -t yt-dlp --no-cache ; cd - > /dev/null'"
|
|
|
+
|
|
|
+
|