mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 10:15:14 +00:00
Couchpotato start and stop
This commit is contained in:
parent
79c9040c64
commit
dafd55e076
2 changed files with 46 additions and 32 deletions
|
@ -17,3 +17,6 @@ couchpotato_port: "5050"
|
|||
|
||||
# specs
|
||||
couchpotato_memory: 1g
|
||||
|
||||
# docker
|
||||
couchpotato_container_name: couchpotato
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- name: Create Couchpotato Directories
|
||||
- name: Start Couchpotato
|
||||
block:
|
||||
- name: Create Couchpotato Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
|
@ -7,9 +9,9 @@
|
|||
with_items:
|
||||
- "{{ docker_home }}/couchpotato/config"
|
||||
|
||||
- name: Couchpotato Docker Container
|
||||
- name: Couchpotato Docker Container
|
||||
docker_container:
|
||||
name: couchpotato
|
||||
name: "{{ couchpotato_container_name }}"
|
||||
image: linuxserver/couchpotato
|
||||
pull: true
|
||||
volumes:
|
||||
|
@ -32,3 +34,12 @@
|
|||
traefik.http.routers.couchpotato.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.couchpotato.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.couchpotato.loadbalancer.server.port: "5050"
|
||||
when: couchpotato_enabled is true
|
||||
|
||||
- name: Stop Couchpotato
|
||||
block:
|
||||
- name: Stop Couchpotato
|
||||
docker_container:
|
||||
name: "{{ couchpotato_container_name }}"
|
||||
state: absent
|
||||
when: couchpotato_enabled is false
|
||||
|
|
Loading…
Reference in a new issue