--- - name: Create peertube network become: true community.docker.docker_network: name: peertube - name: Create redis container include_role: name: redis vars: preset: persistent container_name: peertube-redis docker_networks: - name: peertube docker_volume: peertube-redis - name: Create peertube config dir become: true ansible.builtin.file: path: /etc/peertube state: directory mode: '1700' owner: "999" group: "999" - name: Copy default config become: true ansible.builtin.copy: src: default.yaml dest: /etc/peertube/default.yaml owner: "999" group: "999" - name: Copy production config become: true ansible.builtin.template: src: production.yaml.j2 dest: /etc/peertube/production.yaml owner: "999" group: "999" 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 }}"