ansible/roles/peertube/tasks/main.yml

30 lines
730 B
YAML

---
- name: Create Peertube directory
file:
path: "{{ peertube_folder_name }}"
state: directory
owner: "{{ base_user_name }}"
group: "{{ base_user_name }}"
mode: 0755
- name: Copy Peertube templates (env file and Compose)
template:
src: "{{ item }}"
# Remove .j2 extension
dest: "{{ peertube_folder_name }}/{{ (item | splitext)[0] }}"
owner: "{{ base_user_name }}"
group: "{{ base_user_name }}"
mode: 0644
loop:
- docker-compose.yml.j2
- conf.env.j2
- peertube.conf.j2
- name: Ensure container is up to date
community.docker.docker_compose:
project_src: "{{ peertube_folder_name }}"
remove_orphans: yes
pull: yes
recreate: smart
state: present