35 lines
882 B
YAML
35 lines
882 B
YAML
|
---
|
||
|
- name: Create peertube network
|
||
|
become: true
|
||
|
community.docker.docker_network:
|
||
|
name: peertube
|
||
|
- name: Create peertube-redis docker volume
|
||
|
become: true
|
||
|
community.docker.docker_volume:
|
||
|
name: peertube-redis
|
||
|
- name: Create /etc/redis/peertube dir
|
||
|
become: true
|
||
|
ansible.builtin.file:
|
||
|
path: /etc/redis/peertube
|
||
|
state: directory
|
||
|
mode: '1755'
|
||
|
owner: root
|
||
|
group: root
|
||
|
- name: Copy redis config
|
||
|
become: true
|
||
|
ansible.builtin.copy:
|
||
|
src: redis.conf
|
||
|
dest: /etc/redis/peertube/redis.conf
|
||
|
- name: Run peertube-redis container
|
||
|
become: true
|
||
|
community.docker.docker_container:
|
||
|
name: peertube-redis
|
||
|
image: redis:7.4-bookworm
|
||
|
command: ["redis-server", "/etc/redis/redis.conf"]
|
||
|
networks:
|
||
|
- name: peertube
|
||
|
volumes:
|
||
|
- peertube-redis:/data
|
||
|
- /etc/redis/peertube:/etc/redis:ro
|
||
|
restart_policy: unless-stopped
|