mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
More apps start/stop
This commit is contained in:
parent
8a44a389c2
commit
90a4eacad6
17 changed files with 356 additions and 254 deletions
7
nas.yml
7
nas.yml
|
@ -80,37 +80,30 @@
|
|||
- role: dashy
|
||||
tags:
|
||||
- dashy
|
||||
when: (dashy_enabled | default(False))
|
||||
|
||||
- role: deluge
|
||||
tags:
|
||||
- deluge
|
||||
when: (deluge_enabled | default(False))
|
||||
|
||||
- role: dokuwiki
|
||||
tags:
|
||||
- dokuwiki
|
||||
when: (dokuwiki_enabled | default(False))
|
||||
|
||||
- role: duplicacy
|
||||
tags:
|
||||
- duplicacy
|
||||
when: (duplicacy_enabled | default(False))
|
||||
|
||||
- role: duplicati
|
||||
tags:
|
||||
- duplicati
|
||||
when: (duplicati_enabled | default(False))
|
||||
|
||||
- role: emby
|
||||
tags:
|
||||
- emby
|
||||
when: (emby_enabled | default(False))
|
||||
|
||||
- role: esphome
|
||||
tags:
|
||||
- esphome
|
||||
when: (esphome_enabled | default(False))
|
||||
|
||||
- role: firefly
|
||||
tags:
|
||||
|
|
|
@ -8,3 +8,6 @@ dashy_hostname: "dashy"
|
|||
|
||||
# specs
|
||||
dashy_memory: 2g
|
||||
|
||||
# docker
|
||||
dashy_container_name: dashy
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
- name: Dashy Docker Container
|
||||
- name: Start Dashy
|
||||
block:
|
||||
- name: Dashy Docker Container
|
||||
docker_container:
|
||||
name: dashy
|
||||
name: "{{ dashy_container_name }}"
|
||||
image: lissy93/dashy:latest
|
||||
pull: true
|
||||
ports:
|
||||
|
@ -15,3 +17,12 @@
|
|||
traefik.http.routers.dashy.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.dashy.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.dashy.loadbalancer.server.port: "80"
|
||||
when: dashy_enabled is true
|
||||
|
||||
- name: Stop Dashy
|
||||
block:
|
||||
- name: Stop Dashy
|
||||
docker_container:
|
||||
name: "{{ dashy_container_name }}"
|
||||
state: absent
|
||||
when: dashy_enabled is false
|
||||
|
|
|
@ -22,3 +22,5 @@ deluge_timezone: "{{ ansible_nas_timezone }}"
|
|||
|
||||
# specs
|
||||
deluge_memory: 1g
|
||||
|
||||
deluge_container_name: deluge
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
- name: Create Deluge Directories
|
||||
- name: Start Deluge
|
||||
block:
|
||||
- name: Create Deluge Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
# mode: 0755
|
||||
with_items:
|
||||
- "{{ deluge_config_directory }}"
|
||||
- "{{ deluge_download_directory }}"
|
||||
|
||||
- name: Deluge Docker Container
|
||||
- name: Deluge Docker Container
|
||||
docker_container:
|
||||
name: deluge
|
||||
image: linuxserver/deluge
|
||||
|
@ -31,3 +32,12 @@
|
|||
traefik.http.routers.deluge.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.deluge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.deluge.loadbalancer.server.port: "8112"
|
||||
when: when deluge_enabled is true
|
||||
|
||||
- name: Stop Deluge
|
||||
block:
|
||||
- name: Stop Deluge
|
||||
docker_container:
|
||||
name: "{{ deluge_container_name }}"
|
||||
state: absent
|
||||
when: deluge_enabled is false
|
||||
|
|
|
@ -15,3 +15,6 @@ dokuwiki_port: "8085"
|
|||
|
||||
# specs
|
||||
dokuwiki_memory: 1g
|
||||
|
||||
# docker
|
||||
docuwiki_container_name: docuwiki
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
---
|
||||
- name: Create DokuWiki Directories
|
||||
- name: Start Docuwiki
|
||||
block:
|
||||
- name: Create DokuWiki Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ dokuwiki_data_directory }}/data"
|
||||
|
||||
- name: DokuWiki Docker Container
|
||||
- name: DokuWiki Docker Container
|
||||
docker_container:
|
||||
name: dokuwiki
|
||||
name: "{{ docuwiki_container_name }}"
|
||||
image: linuxserver/dokuwiki:latest
|
||||
pull: true
|
||||
volumes:
|
||||
|
@ -28,3 +30,12 @@
|
|||
traefik.http.routers.dokuwiki.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.dokuwiki.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.dokuwiki.loadbalancer.server.port: "80"
|
||||
when: docuwiki_enabled is true
|
||||
|
||||
- name: Stop Docuwiki
|
||||
block:
|
||||
- name: Stop Docuwiki
|
||||
docker_container:
|
||||
name: "{{ docuwiki_container_name }}"
|
||||
state: absent
|
||||
when: docuwiki_enabled is false
|
||||
|
|
|
@ -22,3 +22,6 @@ duplicacy_port: "3875"
|
|||
duplicacy_hostname: "duplicacy"
|
||||
|
||||
duplicacy_memory: 1g
|
||||
|
||||
# docker
|
||||
duplicacy_container_name: duplicacy
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- name: Create Duplicacy Directories
|
||||
- name: Start Duplicacy
|
||||
block:
|
||||
- name: Create Duplicacy Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
|
@ -8,9 +10,9 @@
|
|||
- "{{ duplicacy_logs_directory }}"
|
||||
- "{{ duplicacy_cache_directory }}"
|
||||
|
||||
- name: Duplicacy Docker Container
|
||||
- name: Duplicacy Docker Container
|
||||
docker_container:
|
||||
name: duplicacy
|
||||
name: "{{ duplicacy_container_name }}"
|
||||
image: saspus/duplicacy-web:mini
|
||||
hostname: "{{ duplicacy_hostname }}"
|
||||
pull: true
|
||||
|
@ -35,3 +37,12 @@
|
|||
traefik.http.routers.duplicacy.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.duplicacy.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.duplicacy.loadbalancer.server.port: "3875"
|
||||
when: duplicacy_enabled is true
|
||||
|
||||
- name: Stop Duplicacy
|
||||
block:
|
||||
- name: Stop Duplicacy
|
||||
docker_container:
|
||||
name: "{{ duplicacy_container_name }}"
|
||||
state: absent
|
||||
when: duplicacy_enabled is false
|
||||
|
|
|
@ -17,3 +17,6 @@ duplicati_port: "8200"
|
|||
duplicati_hostname: "duplicati"
|
||||
|
||||
duplicati_memory: 1g
|
||||
|
||||
# docker
|
||||
duplicati_container_name: duplicati
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
---
|
||||
- name: Create Duplicati Directory
|
||||
- name: Start Duplicati
|
||||
block:
|
||||
- name: Create Duplicati Directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ duplicati_data_directory }}"
|
||||
|
||||
- name: Dupicati Docker Container
|
||||
- name: Dupicati Docker Container
|
||||
docker_container:
|
||||
name: duplicati
|
||||
name: "{{ duplicati_container_name }}"
|
||||
image: linuxserver/duplicati
|
||||
pull: true
|
||||
ports:
|
||||
|
@ -31,3 +33,12 @@
|
|||
traefik.http.routers.duplicati.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.duplicati.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.duplicati.loadbalancer.server.port: "8200"
|
||||
when: duplicati_enabled is true
|
||||
|
||||
- name: Stop Duplicati
|
||||
block:
|
||||
- name: Stop Duplicati
|
||||
docker_container:
|
||||
name: "{{ duplicati_container_name }}"
|
||||
state: absent
|
||||
when: duplicati_enabled is false
|
||||
|
|
|
@ -23,3 +23,6 @@ emby_hostname: "emby"
|
|||
|
||||
# specs
|
||||
emby_memory: 1g
|
||||
|
||||
# docker
|
||||
emby_container_name: emby
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
---
|
||||
- name: Create Emby Directories
|
||||
- name: Start Emby
|
||||
block:
|
||||
- name: Create Emby Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ emby_config_directory }}"
|
||||
|
||||
- name: Emby Docker Container
|
||||
- name: Emby Docker Container
|
||||
docker_container:
|
||||
name: emby
|
||||
name: "{{ emby_container_name }}"
|
||||
image: emby/embyserver
|
||||
pull: true
|
||||
volumes:
|
||||
|
@ -31,3 +33,12 @@
|
|||
traefik.http.routers.emby.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.emby.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.emby.loadbalancer.server.port: "8096"
|
||||
when: emby_enabled is true
|
||||
|
||||
- name: Stop Emby
|
||||
block:
|
||||
- name: Stop Emby
|
||||
docker_container:
|
||||
name: "{{ emby_container_name }}"
|
||||
state: absent
|
||||
when: emby_enabled is false
|
||||
|
|
|
@ -15,3 +15,6 @@ esphome_port: "6052"
|
|||
|
||||
# specs
|
||||
esphome_memory: 1g
|
||||
|
||||
# docker
|
||||
esphome_container_name: esphome
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
---
|
||||
- name: Create EspHome Directories
|
||||
- name: Start EspHome
|
||||
block:
|
||||
- name: Create EspHome Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ esphome_data_directory }}/data"
|
||||
|
||||
- name: EspHome Docker Container
|
||||
- name: EspHome Docker Container
|
||||
docker_container:
|
||||
name: esphome
|
||||
name: "{{ esphome_container_name }}"
|
||||
image: esphome/esphome:latest
|
||||
pull: true
|
||||
volumes:
|
||||
|
@ -29,3 +31,12 @@
|
|||
traefik.http.routers.esphome.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.esphome.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.esphome.loadbalancer.server.port: "80"
|
||||
when: esphome_enabled is true
|
||||
|
||||
- name: Stop EspHome
|
||||
block:
|
||||
- name: Stop EspHome
|
||||
docker_container:
|
||||
name: "{{ esphome_container_name }}"
|
||||
state: absent
|
||||
when: esphome_enabled is false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
heimdall_enabled: true
|
||||
heimdall_enabled: false
|
||||
heimdall_available_externally: false
|
||||
|
||||
# directories
|
||||
|
@ -17,3 +17,5 @@ heimdall_group_id: "1310"
|
|||
|
||||
# specs
|
||||
heimdall_memory: 1g
|
||||
|
||||
heimdall_container_name: heimdall
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
- name: Create Heimdall group
|
||||
- name: Start Heimdall
|
||||
block:
|
||||
- name: Create Heimdall group
|
||||
group:
|
||||
name: heimdall
|
||||
gid: "{{ heimdall_group_id }}"
|
||||
state: present
|
||||
|
||||
- name: Create Heimdall user
|
||||
- name: Create Heimdall user
|
||||
user:
|
||||
name: heimdall
|
||||
uid: "{{ heimdall_user_id }}"
|
||||
|
@ -15,7 +17,7 @@
|
|||
create_home: no
|
||||
group: heimdall
|
||||
|
||||
- name: Create Heimdall Directories
|
||||
- name: Create Heimdall Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
|
@ -24,9 +26,9 @@
|
|||
with_items:
|
||||
- "{{ heimdall_data_directory }}"
|
||||
|
||||
- name: Create Heimdall container
|
||||
- name: Create Heimdall container
|
||||
docker_container:
|
||||
name: heimdall
|
||||
name: "{{ heimdall_container_name }}"
|
||||
image: "{{ heimdall_docker_image }}"
|
||||
pull: true
|
||||
volumes:
|
||||
|
@ -47,3 +49,12 @@
|
|||
traefik.http.routers.heimdall.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.heimdall.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.heimdall.loadbalancer.server.port: "80"
|
||||
when: heimdall_enabled is true
|
||||
|
||||
- name: Stop Heimdall
|
||||
block:
|
||||
- name: Stop Heimdall
|
||||
docker_container:
|
||||
name: "{{ heimdall_container_name }}"
|
||||
state: absent
|
||||
when: heimdall_enabled is false
|
||||
|
|
Loading…
Reference in a new issue