infra/roles/sudoisytdl/tasks/sudoisytdl.yml

39 lines
891 B
YAML

---
- name: create dl dir
file:
path: "{{ ytdl_dl_dir }}"
state: directory
mode: 0775
owner: sudoisytdl
group: sudoisytdl
- name: sudoisytdl container
docker_container:
name: sudoisytdl
image: benediktkr/sudoisytdl:latest
pull: yes
detach: yes
auto_remove: no
restart_policy: "unless-stopped"
user: "{{ ytdl_user.uid }}"
state: started
container_default_behavior: compatibility
network_mode: bridge
networks_cli_compatible: yes
networks:
- name: bridgewithdns
env:
TG_TOKEN: "{{ ytdl_tg_token }}"
DOMAIN: "{{ ytdl_domain }}"
MY_TG: "{{ ytdl_my_tg }}"
EXPIRE_AFTER_MINS: "{{ ytdl_expire_after_mins }}"
DEBUG: "false"
volumes:
- "{{ ytdl_dl_dir }}:/data"
- "{{ ytdl_web_dir }}:/web"
tags:
- sudoisytdl-container
- ytdl-container
- docker-containers