Install librespeed
This commit is contained in:
parent
cdc7209013
commit
1414357ad7
3 changed files with 50 additions and 0 deletions
16
ansible/roles/docker/files/librespeed/docker-compose.yml
Normal file
16
ansible/roles/docker/files/librespeed/docker-compose.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
version: "2"
|
||||
services:
|
||||
librespeed:
|
||||
image: linuxserver/librespeed:5.1-ls2
|
||||
container_name: librespeed
|
||||
environment:
|
||||
- PUID=3000
|
||||
- PGID=3000
|
||||
- TZ=Europe/London
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.librespeed.rule=Host(`speed.jakehoward.tech`)"
|
||||
- "traefik.http.routers.librespeed.tls=true"
|
||||
- "traefik.http.routers.librespeed.tls.certresolver=le"
|
||||
- "traefik.http.routers.librespeed.middlewares=internal-only@file"
|
31
ansible/roles/docker/tasks/librespeed.yml
Normal file
31
ansible/roles/docker/tasks/librespeed.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
- name: Create librespeed directory
|
||||
file:
|
||||
path: '/opt/librespeed'
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
become_user: root
|
||||
|
||||
- name: Install librespeed compose file
|
||||
template:
|
||||
src: files/librespeed/docker-compose.yml
|
||||
dest: "/opt/librespeed/docker-compose.yml"
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: /usr/bin/docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
become_user: root
|
||||
|
||||
- name: Cycle librespeed container
|
||||
docker_compose:
|
||||
project_src: /opt/librespeed
|
||||
pull: true
|
||||
remove_orphans: true
|
||||
remove_volumes: true
|
||||
state: "{{ item }}"
|
||||
when: compose_file.changed
|
||||
loop:
|
||||
- absent
|
||||
- present
|
|
@ -21,3 +21,6 @@
|
|||
|
||||
- name: Install emby
|
||||
include: emby.yml
|
||||
|
||||
- name: Install librespeed
|
||||
include: librespeed.yml
|
||||
|
|
Loading…
Reference in a new issue