Deploy deluge in docker
Makes version managing so much easier!
This commit is contained in:
parent
ac68b36841
commit
e8496ddced
5 changed files with 51 additions and 0 deletions
|
@ -13,3 +13,5 @@ pve_hosts:
|
|||
ip: 192.168.2.41
|
||||
forrest:
|
||||
internal_ip: 10.23.1.99
|
||||
deluge:
|
||||
internal_ip: 10.23.1.52
|
||||
|
|
|
@ -70,3 +70,7 @@
|
|||
- hosts: forrest
|
||||
roles:
|
||||
- forrest
|
||||
|
||||
- hosts: deluge
|
||||
roles:
|
||||
- deluge
|
||||
|
|
24
ansible/roles/deluge/files/docker-compose.yml
Normal file
24
ansible/roles/deluge/files/docker-compose.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
version: "2.3"
|
||||
|
||||
services:
|
||||
deluge:
|
||||
image: linuxserver/deluge:latest
|
||||
network_mode: host
|
||||
environment:
|
||||
- PUID={{ docker_user.id }}
|
||||
- PGID={{ docker_user.id }}
|
||||
- TZ=Europe/London
|
||||
volumes:
|
||||
- ./deluge:/config
|
||||
- /mnt/downloads:/downloads
|
||||
restart: unless-stopped
|
||||
|
||||
egress:
|
||||
image: theorangeone/static-server:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- INDEX=on
|
||||
volumes:
|
||||
- /mnt/downloads:/srv:ro
|
||||
ports:
|
||||
- 80:80
|
4
ansible/roles/deluge/handlers/main.yml
Normal file
4
ansible/roles/deluge/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- name: restart deluge
|
||||
shell:
|
||||
chdir: /opt/deluge
|
||||
cmd: "{{ docker_update_command }}"
|
17
ansible/roles/deluge/tasks/main.yml
Normal file
17
ansible/roles/deluge/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: Create deluge directory
|
||||
file:
|
||||
path: /opt/deluge
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install deluge compose file
|
||||
template:
|
||||
src: files/docker-compose.yml
|
||||
dest: /opt/deluge/docker-compose.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: /usr/bin/docker-compose -f %s config
|
||||
notify: restart deluge
|
||||
become: true
|
Loading…
Reference in a new issue