homelab/roles/peertube/tasks/peertube.yml

42 lines
990 B
YAML
Raw Normal View History

2024-10-19 00:09:55 +05:00
---
- name: Create peertube config dir
become: true
ansible.builtin.file:
path: /etc/peertube
state: directory
mode: '1700'
owner: root
group: root
- name: Copy default config
become: true
ansible.builtin.copy:
src: default.yaml
dest: /etc/peertube/default.yaml
- name: Copy production config
become: true
ansible.builtin.template:
src: production.yaml.j2
dest: /etc/peertube/production.yaml
register: cfg
- name: Create peertube-data volume
become: true
community.docker.docker_volume:
name: peertube-data
- name: Run peertube container
become: true
community.docker.docker_container:
name: peertube
image: chocobozzz/peertube:v6.3.2-bookworm
networks:
- name: peertube
- name: haproxy
- name: postgresql
volumes:
- /mnt/hdd/peertube:/data
- /etc/peertube:/config
mounts:
- type: tmpfs
target: /data/tmp
tmpfs_size: "4G"
recreate: "{{ cfg.changed }}"