implement nas
All checks were successful
Deploy Containers / Prepare (push) Successful in 45s

This commit is contained in:
2025-08-03 15:13:29 -04:00
parent 93583a4c04
commit 0ed6b8b408
4 changed files with 120 additions and 0 deletions

26
host_vars/nas.yml Normal file
View File

@@ -0,0 +1,26 @@
$ANSIBLE_VAULT;1.1;AES256
33336635366534393235393364383665313439643334346365633364303066366362636561333136
3832333636666536366233313933306563386635666434380a316433386562633964336339646362
35653933303462396533613861616562353361633734616261626666643963356231653761336333
3363653765393164660a656134376235323330613762366635373765323562383465333834336139
37393233623430336466313063313966623739316432333261613761386232623166396533656334
39626131333734613330376539666365303961346565626466366266333834626633306437353237
32373530316639393664333536666566366538663731343634323735393765643966343131323432
63323531393064616132616563386336386236343737633031613565616638396231333037636366
34363637333632626564656334393437633863636364636464643764346430323431633365376466
35303034306166363763653838336634353166313131626237636466373136613434323262656336
63373261333432323935363033613330303762363461663331653133346339643661623062663338
63626434313166383564393833303962343661313830633930636638666166363333616566303162
39383463396262376538646265383261396461663866623739393337383336336639656434646566
62316538613834323666393233643866396236613363346631313132623837653736373535303539
30633931303863323264643365373464323738653863613438393139613938363261636639303332
37383837326339323565613135326135353935333561643936333962383838633839343133326361
37646262383961306436646235353134356534393530373134366366323630613465643961383637
31303935343435333735656330373464343761653965356439316534616335353135363165656132
35343563313764663265346338666461363532376563666338656138353235363763626138336165
30303162613137323732333738376232303633316461643261613066663233396666633230303233
66313863393836613466316339633664396636373738393130633030626534383165336235313264
31613935663263613239373635643438656666303034336535613938356330383930383333303936
66613261653463653731313836663930326637653134393862623562623734616466373966363034
63373437653231303134306163646265316137323537303031313435313935613832346435323232
6335

View File

@@ -105,3 +105,17 @@
- name: Deploy Nextcloud
import_tasks: tasks/nextcloud.yml
tags: nextcloud_deploy
- hosts: nas
roles:
- role: traefik
tags: traefik_deploy
tasks:
- name: Deploy Plex
import_tasks: tasks/plex.yml
tags: plex_deploy
- name: Deploy Frigate
import_tasks: tasks/frigate.yml
tags: frigate_deploy

42
tasks/frigate.yml Normal file
View File

@@ -0,0 +1,42 @@
---
- name: Create folder structure
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_dir }}/frigate"
- name: Pull latest Frigate Docker Image
docker_image:
name: ghcr.io/blakeblackshear/frigate
tag: stable
source: pull
- name: Deploy Frigate Docker Container
docker_container:
name: frigate
image: ghcr.io/blakeblackshear/frigate:stable
recreate: true
privileged: true
restart_policy: unless-stopped
published_ports:
- "5000:5000"
- "8555:8555/tcp"
- "8555:8555/udp"
- "8554:8554"
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
networks:
- name: "{{ docker_network_name }}"
volumes:
- /etc/localtime:/etc/localtime:ro
- "{{ data_dir }}/frigate:/config"
- "{{ FRIGATE_RECORDINGS_PATH }}:/media/frigate"
networks:
- name: "{{ docker_network_name }}"
labels:
traefik.enable: "true"
traefik.http.routers.frigate.rule: Host(`nvr.fntz.net`)
traefik.http.routers.frigate.entrypoints: webSecure
traefik.http.routers.frigate.tls.certresolver: letsencrypt
traefik.http.services.frigate.loadbalancer.server.port: "5000"

38
tasks/plex.yml Normal file
View File

@@ -0,0 +1,38 @@
---
- name: Create folder structure
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_dir }}/plex"
- name: Pull latest Plex Docker Image
docker_image:
name: lscr.io/linuxserver/plex
tag: latest
source: pull
- name: Deploy Plex Docker Container
docker_container:
name: plex
image: lscr.io/linuxserver/plex
network_mode: host
restart_policy: unless-stopped
recreate: true
devices:
- /dev/dri:/dev/dri
env:
PUID: "{{ PUID }}"
PGID: "{{ PGID }}"
TZ: "{{ TZ }}"
VERSION: "docker"
PLEX_CLAIM: "{{ PLEX_CLAIM_TOKEN }}"
volumes:
- "{{ data_dir }}/plex:/config"
- "{{ media_path }}:/media"
labels:
traefik.enable: "true"
traefik.http.routers.plex.rule: Host(`tv.fntz.net`)
traefik.http.routers.plex.entrypoints: webSecure
traefik.http.routers.plex.tls.certresolver: letsencrypt
traefik.http.services.plex.loadbalancer.server.url: "http://172.16.0.29:32400"