2019-10-23 15:54:32 -07:00
|
|
|
---
|
|
|
|
# https://github.com/linuxserver/docker-hydra2
|
|
|
|
- name: Media Server
|
2019-11-03 21:46:19 -08:00
|
|
|
become: yes
|
|
|
|
hosts: linux
|
2019-10-23 15:54:32 -07:00
|
|
|
vars_files:
|
|
|
|
- vars.yml
|
|
|
|
|
|
|
|
tasks:
|
2019-11-03 21:46:19 -08:00
|
|
|
- name: pip docker-py - absent
|
2019-10-23 15:54:32 -07:00
|
|
|
pip:
|
2019-11-03 21:46:19 -08:00
|
|
|
name: docker-py
|
|
|
|
state: absent
|
|
|
|
executable: pip3
|
2019-10-23 15:54:32 -07:00
|
|
|
|
2019-11-03 21:46:19 -08:00
|
|
|
- name: pip docker - present
|
|
|
|
pip:
|
|
|
|
name: docker
|
2019-10-23 15:54:32 -07:00
|
|
|
state: present
|
2019-11-03 21:46:19 -08:00
|
|
|
executable: pip3
|
2019-10-23 15:54:32 -07:00
|
|
|
|
|
|
|
- name: Hydra Network
|
|
|
|
docker_network:
|
|
|
|
name: "{{ network }}"
|
|
|
|
|
|
|
|
- name: stop hydra
|
|
|
|
docker_container:
|
|
|
|
name: hydra
|
|
|
|
state: stopped
|
2019-11-03 21:46:19 -08:00
|
|
|
ignore_errors: yes
|
2019-10-23 15:54:32 -07:00
|
|
|
|
|
|
|
- name: Make Hydra
|
|
|
|
docker_container:
|
|
|
|
name: hydra
|
2019-11-03 21:46:19 -08:00
|
|
|
image: 'linuxserver/hydra2:latest'
|
2019-10-23 15:54:32 -07:00
|
|
|
state: started
|
|
|
|
env:
|
|
|
|
PUID=1000
|
|
|
|
PGID=1000
|
|
|
|
TZ=Europe/London
|
|
|
|
ports:
|
|
|
|
- 5076:5076
|
|
|
|
volumes:
|
2019-11-03 21:46:19 -08:00
|
|
|
#- "{{ hydra_config }}:/config"
|
|
|
|
- "/docker/hydra:/config"
|
2019-10-23 15:54:32 -07:00
|
|
|
- "{{ shared_downloads }}:/downloads"
|
|
|
|
networks:
|
|
|
|
- name: "{{ network }}"
|