diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..b1a9d2f --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,4 @@ +[defaults] +inventory=inventories/hosts +host_key_checking=False +interpreter_python=auto_silent \ No newline at end of file diff --git a/group_vars/all.template.yml b/group_vars/all.template.yml new file mode 100644 index 0000000..e69de29 diff --git a/group_vars/all.yml b/group_vars/all.yml new file mode 100644 index 0000000..ecb0d92 --- /dev/null +++ b/group_vars/all.yml @@ -0,0 +1,166 @@ +$ANSIBLE_VAULT;1.1;AES256 +33616433323835343637373139633638626263306633636334343435363438613030613130373232 +3061356530636332323864656138626561323737363964390a316234623063383133316465656435 +30386262356536353131393362646431616666353035343136663838346438623837656262626634 +6136626466316466350a643639303435393430303030383438383461333739343538393632326530 +65633335313935373332633664633133666436386563653334333731633232323962633037633764 +34303439363565363632393335653362343539336533393361656464616366613732326461643735 +63613539323363393165323634376638626566356335353065346638333539656439643232303833 +31653031373261653365666266366132323331366465666238363531646665343035353038306661 +64616633393732653032313737643266336138343030343934653835306431316538663139306337 +38333030353062383437353230306164383663383739613762346537336361366630346231623264 +31343765303063366133353766336635646666656533313531383636656665363965653163653534 +33393666633039643637383239353061656232616166353264363166636436646436336537346461 +39663537396234613961326661613565653762383530386136363339376632313462383438373864 +37346237313562663239643364313063613161336534303931386630393431353439303864633334 +38376131373735363238666435613830313138333630643235353430636431323230323363383936 +66313161346631386361316330653561646364353132383166613562376339393335326466393039 +65396539363630653437633763623161383030616162653135346435376362653234326164623539 +66626434326362663061623830623763363237366466656430323639633363363833643466303330 +34303031303062323561313036613066303961643133363465633839303265393563313763623335 +65333731333263376663616637653633366236663331653863333963363736383164663433633664 +62303331373233336138623461323263313837313861656438363332626236373439656637333261 +62306663383763303338396438333336363066353631383462353261363966343633383532323630 +35663039383234366136643531343432623537386531616164643162336361353863663964333835 +62383765323032353862653966316634623162643063363262646236316365336335623033383435 +36353337646534636664623937616233386134386638623538613766393933633665396632636362 +63623262653435303131613433393635636265623332363264373461353439303537306361316333 +32326162653362623762656433363064643163666232656364653963613965616465646161346237 +36363339623061663433653337633035643638383564386666373835313466653366663533363131 +64666564663137333830666637313039333064373134636165653532326133393636643334346563 +38383262313965393136343464356634346135663765343237343865616339343962383163346637 +37373065613537386437666465666231636532636562613530623762393535303166616462396634 +66613366346134313433346261646363646261643562656161366665646664643563346239623735 +38653334613437313865306639316134636465613634343035356539343334383464353331333862 +34636333356332663639316131383132396437373764333639656634626536306230343936646163 +34336430316363363732366238356332623938616633393536663763616263366266626431396237 +34326131653037626531316163616164316133653762623361653061333239363739643761393039 +66326466386439623863376636366263333465663439326237356636316565646136373036376337 +39623861363930336233303565313530653535313337346162303931303634303564336164626333 +34633531393135646364323732653937666332653432323666633433643966376339316263626230 +66363763633838613861333933393733613239663264366565666130396336383632373031616333 +64633336396532306631383365623234666465643461336262636530643138333736376263343338 +35333936373937353836613434393765326630313435613661313637346630623565326562346465 +33346332623532646430376466636464383038363135383863353931346366303331666239646533 +33633963353136363565303137383063326331646130373434373866633362306131373766366463 +35316561616561666533633963373866306165323935353336376435326135373231663437393762 +32363137353663643265363664353061623265316436386634363161646439306665363732653639 +61343034313934636366643431626261646461303563666431383139616365376631623066666638 +64326664633232653463373830633866376236323161663939346261646366363639323237396637 +66626434313565346132653531663632326532343936333233333337633562313137386634383337 +38353862306136363366333439393765666161336533663763666135373064393336623166386366 +38316561663433613265663037393165623038393766386164336365376239353337393539323134 +64303166383433343237323135386362333966343235393032663133633661643061313137636334 +39303536336133616139636135663731333062636566306663666433363732303734333336386236 +33343736643431653930386564663131353839636134376332656131393734386337363239333562 +32303161643637623730376165663532646134383463383361356435303431653433663665613430 +34656163393561366465353231316165353964656133663435663137343862666132343333663563 +30396439653663356439326133336538626634306164366433666563363861353834646139646165 +38363035323634653139656534353932613032343434633565343563323064653038363531313334 +34653763393865306132306631663232373831653630373032373234626237386336613861353765 +62313130356536306232613234623533333764316137653966373731616664373764313563366534 +63326561623866393431633131656134336334616430333837383631616639333961613133313562 +65623338643636623834393631653330383836316464633337313864353565646232336333643932 +61343532613665613764343537653637323732323366396665313834633931386464373832396336 +37393639326238653066303263626664623230633161306238386532626637373263653435663465 +35653736353761346335383861343633323437326165366234396435376436653835666436623837 +35353937323763636463656531363131636634386361336134373561313436373230393738613233 +39366336336362663832366662616538353066396662633131356466376231656433383063316138 +34373836353735383530393331333261326233326139633539346262333333333266323739303339 +31366462306430353839346237306538303137646236306135383866303231646537303337303965 +30636461383862646132626461643431303064633639353238373661363436376461383461613862 +31613661626436393338313665313564383030663035616430383133336138643633333539623862 +64653833363365653065303961343038633665343937333335303865313866396561623935396162 +35376538396135366630633561303366373638376565363434653334353037376166396433373939 +32376263323531656136386661363663356130356137383063323165366135346166636431653232 +30363037663161376136333339626430353263646566643032383130333766336461323535643736 +34616161613334323762343134376234666562383631343933383166353533383933623432663863 +63363561323562306664643736393264356333633161363637323735373161653461393864303536 +32336435356461386164376261613963326632613562333333616231336132333931633366363263 +66376433316362373862343464656432343163663035393366366235643738616237376530623639 +66633263346639343835373634383366306338663965643663323232356666313338363638636661 +39613264353534346561376630373339363164323431376131383662636563343338653635383534 +62383937376131386530336237333765623434663062666163323333393439333862343461366434 +34383462326634623262313132663036323865653732353764326239366536373639323430616133 +65633063383665376263313438316563393632373834383364383839633639356333656664626431 +37306139613962363739643032316638373562663537616338386335346464653130623266373964 +36636436343932343239623061303534383765333035613666393634366631323831333063616565 +37373037306234633463393363643735346361343463636133323230363862656665353237613264 +38623138326137393931643039633738613161653938363966343631623130396364303161303731 +64323930373431353462386532336632376434353331323939643963643766666131323566663836 +35303335643139313966336265663662616664326530616436653338393634353533616333363461 +63383964666135666263363463656634323038663938363866653461663338326462303332313732 +36623337303161353732643237656266666436623332343465353463316334326331343338653535 +62633331613863343638613831373563666135376233336266633434343335306264393539376530 +66633937346236613731323965343236613831376366613265366662303966366432336137663765 +66376532326535636530393932363163323630643034343266613236333338306466643932353236 +37306238363239656263616232666564356234623562393764626164646366373730333764313232 +33653132633635616633363338356164326637633633386666373330323434343635323461303565 +35643733343036376362616264636139656535303233336439633532656437313431323931316464 +31633337313566373630306237613035656261616366386434383038373934353963333265303134 +61616661363233303933306464383361313162323066626133343535616232663536613237666234 +64663161633137303964393465303838653063656633633163343263306432666363333563396537 +65353836376137363434633036333935343836633737326664333063346631373262663166356566 +32363361366633656135393061366266323034633232356332396666363164343363363332396632 +36653934343337303164333831343639356463313565326661306130663861343333353263363138 +36666632656330356664303330653363613339393035653065346539356233363966303032303339 +32323766613438393834313166623562663531633361383931646632646538383934323734313264 +33353937653238396234643666316631376233353436626362636565303932353434353830366364 +61393632613231376335343236646534303637323361613431356538373735326234396532646532 +32616662616639323834386635613939383762383964633764636339323830613137383231346266 +31393736636531393165316139623735373532366666336665303939643034376537386233643831 +33663931643861306565396236376138323631383535343233393166363162323665363864353830 +36666530616638313735623135393062346535656437376635303164666464333336313831386164 +32616163356330326361356266326233623337613766636333373065376331303533323864643964 +36656461656137313031383336366266393761363439383533656334356535393463313432666232 +31646562356563333864356531353732336630323031386561663766376434623638323936363939 +64346233383337353862643765303364646362613330323830326136663663666132306537386135 +39663264346361613430386535373231653438636634343535666239616534663831633531353131 +38346666313764653030613933356338643963353336643630306665666139343035653631626466 +65356462396235363636326165353966623139613365653561626635346462353836373331666233 +36383533656665393936323734383736666663346138393361343838626235373130383031613534 +36303133663134323837393433393935303032366231343637626433623933303165303266633466 +62373636386662356533393531633065383131373031346661386664393963303231656161383464 +35623733613536616538633462636335373537333339396661363461343434323632326232336134 +36626664393534373665616561336261333536333438666232376135306635613432653139353465 +63343861616234333961373963396239376137613338613238373464393865643864353263303235 +39343735623035336637323631613834643661346337356231316564323064653439663533333762 +61366563363733393162613639386138653838316235663933383530636363323533643131663837 +64306332336165393537333163393239343962306335303266336366643932343531383734663433 +63353533353339366138386433353034313235313838363334383433303766353834313233343031 +62343035396362356664336166373239623636333533313930346264623133316639313466616564 +38356163663061613838646234656534353764626138666635343730613036653038316562346430 +65333762326638623030373763636162313232623166343630666461623564623963646637363263 +63343332313063386364356238646365356566313633653834623763303739386637626361383238 +34376165643161346262616434343039343730333661386131366632333564386330373039303431 +33666631346637366634316362346530366539376364646566663235326435336663326561633038 +32313264633565343135306232656236646366343463663039613366373164323430353631396632 +38303566666264666537633831396362306134356634313839663163383166623636333233623063 +31316333316235613238653430326163373537386332386336376561366636363132386333613838 +38643762643136326335666334656662383036373361376439383862623132656632623338383130 +35323132383538346635366331346333663833666237646562316536636538663863336462323937 +38303761616334306165393163636662326131613564353130333233663765333566636331313966 +64396535336362613830666566323530636264303166646262373165303436343063356165363537 +36383965373065326532356231336663343339316339313766363166323162643438316233356661 +32326165366435633934383535343234353236613733613164653433386636353661646164343734 +34373531636363663033313431623136373065383961316266633263303932333530333239393132 +66326530313030373737663662383766613562653636353437613761363935306261316563633965 +33383937373432646539373831363063613961346137363332313139373563656161616164656632 +31633133326362333163393530313964303333363864386437383939306261393136353161346236 +32623234363866376531343336373461616635633963386362303062306532313339336235393930 +63346530383831363430663934306164313735656661326661633436333338303135373636333836 +30616235633133376431343630373065363939646134303566643265343365643965316666343934 +66653739326134356463626639636336663465613166336331353161633833366165663839306139 +61646661363561353133336237623139656264666265393334303337643633653866336334663639 +33663562383330623732346661386532303932393862376130666437653138343635666134323264 +35373336343731313737363537613962663333366161383964313030613633373437386134336234 +38666638333063646132303431313265386565623830306662393364383030623862316334306337 +31336338396334633338653865656335353764643834333632383563306437636138383462383863 +36393239313835643737616630323833636563373063363237326663336433333334343636663663 +38663463323065336261636139623035393162333235626632643339303539616636373666336537 +30626531326231633535303536633838303162343131663030653334613263326534393733376531 +65383864306339636263663464363662336433363764393663386531393735633032383533333131 +66336535653232393735643463663662313538383133393034626566366638353039363832356530 +64373839306564643931393030336133666133666366366239633434343533633931323365636665 +65376432633731646562363139633563653764646332633561363439616133663636373565626233 +6331 diff --git a/inventories/hosts b/inventories/hosts new file mode 100644 index 0000000..6bb5026 --- /dev/null +++ b/inventories/hosts @@ -0,0 +1,2 @@ +[jade] +fntz.net ansible_user=alex \ No newline at end of file diff --git a/main.yml b/main.yml new file mode 100644 index 0000000..3141415 --- /dev/null +++ b/main.yml @@ -0,0 +1,61 @@ +- hosts: jade + + roles: + - role: caddy + tags: caddy_deploy + + tasks: + - name: Deploy Glance + import_tasks: tasks/glance.yml + tags: glance_deploy + - name: Deploy Servarr + import_tasks: tasks/servarr.yml + tags: servarr_deploy + - name: Deploy Dozzle + import_tasks: tasks/dozzle.yml + tags: dozzle_deploy + - name: Deploy Cup + import_tasks: tasks/cup.yml + tags: cup_deploy + - name: Deploy Homebridge + import_tasks: tasks/homebridge.yml + tags: homebridge_deploy + - name: Deploy PiHole + import_tasks: tasks/pihole.yml + tags: pihole_deploy + - name: Deploy PocketID + import_tasks: tasks/pocketid.yml + tags: pocketid_deploy + - name: Deploy Ntfy + import_tasks: tasks/ntfy.yml + tags: ntfy_deploy + - name: Deploy NZBGet + import_tasks: tasks/nzbget.yml + tags: nzbget_deploy + - name: Deploy Tautulli + import_tasks: tasks/tautulli.yml + tags: tautulli_deploy + - name: Deploy Tinyauth + import_tasks: tasks/tinyauth.yml + tags: tinyauth_deploy + - name: Deploy Code Server + import_tasks: tasks/codeserver.yml + tags: codeserver_deploy + - name: Deploy Dashdot + import_tasks: tasks/dashdot.yml + tags: dashdot_deploy + - name: Deploy Romm + import_tasks: tasks/romm.yml + tags: romm_deploy + - name: Deploy Nextcloud + import_tasks: tasks/nextcloud.yml + tags: nextcloud_deploy + - name: Deploy Excalidraw + import_tasks: tasks/excalidraw.yml + tags: excalidraw_deploy + - name: Deploy Vaultwarden + import_tasks: tasks/vaultwarden.yml + tags: vaultwarden_deploy + - name: Deploy Immich + import_tasks: tasks/immich.yml + tags: immich_deploy diff --git a/roles/caddy/tasks/main.yml b/roles/caddy/tasks/main.yml new file mode 100644 index 0000000..3bad28c --- /dev/null +++ b/roles/caddy/tasks/main.yml @@ -0,0 +1,49 @@ +--- +- name: "Create file structure" + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/caddy" + - "{{ data_dir }}/caddy/data" + - "{{ data_dir }}/caddy/certs" + +- name: Create Caddyfile + template: + src: Caddyfile.j2 + dest: "{{ data_dir }}/caddy/Caddyfile" + +- name: Create Dockerfile + template: + src: Dockerfile.j2 + dest: "{{ data_dir }}/caddy/Dockerfile" + +- name: Build Caddy Image + docker_image: + name: caddy + tag: "latest" + build: + path: "{{ data_dir }}/caddy" + dockerfile: "Dockerfile" + source: build + state: present + +- name: Deploy Caddy Container + docker_container: + name: caddy + image: caddy:latest + recreate: true + restart_policy: unless-stopped + networks: + - name: homelab + env: + CLOUDFLARE_TOKEN: "{{ CADDY_CLOUDFLARE_TOKEN }}" + HOST_IP: "{{ CADDY_HOST_IP }}" + VIDEO_MACHINE: "{{ CADDY_VIDEO_MACHINE }}" + volumes: + - "{{ data_dir }}/caddy/data:/data" + - "{{ data_dir }}/caddy/certs:/etc/letsencrypt" + - "{{ data_dir }}/caddy/Caddyfile:/etc/caddy/Caddyfile" + published_ports: + - 80:80 + - 443:443 diff --git a/roles/caddy/templates/Caddyfile.j2 b/roles/caddy/templates/Caddyfile.j2 new file mode 100644 index 0000000..127f725 --- /dev/null +++ b/roles/caddy/templates/Caddyfile.j2 @@ -0,0 +1,53 @@ +# Snippets +{% for snippet_name, snippet_content in caddy_snippets.items() %} +({{ snippet_name }}) { +{% for line in snippet_content %} + {{ line }} +{% endfor %} +} + +{% endfor %} + +# Sites +{% for site in caddy_sites %} +{{ site.domains | join(', ') }} { + {% if site.import_snippets is defined %} + {% for snippet in site.import_snippets %} + import {{ snippet }} + {% endfor %} + {% endif %} + + {% if site.tls is defined %} + tls { + {% if site.tls.dns is defined %} + dns {{ site.tls.dns.provider }} {{ site.tls.dns.token }} + {% endif %} + {% if site.tls.cert is defined %} + {{ site.tls.cert }} {{ site.tls.key }} + {% endif %} + } + {% endif %} + + {% for matcher in site.matchers | default([]) %} + @{{ matcher.name }} {{ matcher.type }} {{ matcher.value }} + {% endfor %} + + {% for handler in site.handlers | default([]) %} + handle {% if handler.matcher is defined %}@{{ handler.matcher }} {% endif %}{ + {% if handler.reverse_proxy is defined %} + reverse_proxy {{ handler.reverse_proxy }} + {% elif handler.respond is defined %} + respond {{ handler.respond }} + {% elif handler.file_server is defined %} + file_server + {% endif %} + {% if handler.custom is defined %} + {% for line in handler.custom %} + {{ line }} + {% endfor %} + {% endif %} + } + {% endfor %} +} + +{% endfor %} \ No newline at end of file diff --git a/roles/caddy/templates/Dockerfile.j2 b/roles/caddy/templates/Dockerfile.j2 new file mode 100644 index 0000000..147a153 --- /dev/null +++ b/roles/caddy/templates/Dockerfile.j2 @@ -0,0 +1,5 @@ +FROM caddy:builder AS builder +RUN caddy-builder \ + github.com/caddy-dns/cloudflare +FROM caddy:latest +COPY --from=builder /usr/bin/caddy /usr/bin/caddy \ No newline at end of file diff --git a/roles/caddy/vars/main.yml b/roles/caddy/vars/main.yml new file mode 100644 index 0000000..78e576d --- /dev/null +++ b/roles/caddy/vars/main.yml @@ -0,0 +1,218 @@ +$ANSIBLE_VAULT;1.1;AES256 +64376461333562383530396334376365313730363033666666373630653965393238666536313632 +3834383462363834343463333064626132396131393061330a376337646537373436656438343661 +34386439333464616166343066376332653363303233323264393935623838326439393732663064 +3033613538383763350a346338616338336662353361363962313363656136636437663765383938 +33343934626161303833373933633862323836613130383730636233653234346263623132613431 +66333366363863613030323438643238393661663066656332386634343766353632353961646163 +37383861383630363730316165313338383434303433313762656237323334363462396435653564 +66633034323161303331346261613333303935306363353133396266303565313436366633303164 +34373263333130653365363163333537383538626463316665326337343032613862303830306164 +64343565633762636365636632316639396362323532363838643039356561623065656236336464 +63636334356532383032633662373162386365383232343634353935626136616163353065306532 +34616230646564613138313034646466626431316539663463623534663263643231616662666564 +63313930323137353162323836313466663834306461656136386563383736393133356632356633 +64626364373437363033333730333035613838346265623864376232366135356231303538636239 +61393764623265323139356235366532383934643764303865353634636564653266636363303636 +66333935616635366662656263623234323766353062383761393463646532333934373831633338 +31383930613437623930656166383832326537633166663863376261306230666138323638393138 +37323565653938396536666633626365306635636565663762376562343163656230343265633266 +62623138353934396639636135353835336535666162343661306130363338313739613465663365 +34306336336531616365303663303133623264616430373731336265663134303337343731366463 +33663734396665323836323666313130333865323632623636386132353437396436383666616236 +66623435346631653465373163613262353431306666333433343938306564626539393739393133 +65353865386230323433626565643266656538363131393531393138633839376531366134303665 +38316436336431616634383430376238613564353761333337643366646233376261373437333837 +38633538623331346664643139383362666239303862376237666633616135633535353838333735 +61306134356564646533613764356335343366663134653665383430393234643831343335373966 +39323431396163306134386165333965393736623536353731663430376137643864666561323564 +37666165613064623861656337666635383238336461646465626362333232653634336466616564 +34383865636166346235386531633164633062323566613664663361336464303661353131626165 +66666661656337363930646337373431663962646239366662326235346265366263323563366562 +63626637373037616163366566643762663431646261323730393736326236346632613439386135 +37373664313065613830356338346232613239653135633266383666366633653363363561336133 +34623835333962303336323532396461653963306435623239376638363561663538623531663534 +31613437656238643735316439323064326566346238303735386162323939353062616563306432 +61373934383863333330323061353262333366333539396435623761636164653564633766366239 +34303830653438636466623330343966643231663935353236363466643464366266616365333261 +38356533386265623166303132643737663762356532376634633336656337376337336332326661 +31636531356537326632363835633135306462323631323061666332376231323131653130346666 +32626433363566356637653834666464393038343131643466353838393039666437363563313762 +66386163313366613239316139333439663234353733353139303332383231656530353963393930 +31613863346364656331393539333964353936346361323637363561666332326231383964633734 +33396133616232373763333365323937303634633935343639343137333237363161613632316532 +30633464656538306537383838383738663136613866346438306461653963363066396262343630 +39303364393030353963646562323531323632363661376166346564333130323966363763363033 +35616163353633303437666131616336343566323037613938636461633037623166313537356637 +65393134376136363539363865636137316266663639626539383432633033376166303632366330 +30626663316334613032326563343734313464346631623831616561303831653636656561313836 +63346533346566356635346332383964393138306133336264653233666136643630363132313134 +36386266356366623832396534303865366162653039306139656131663834363032346533363135 +65323965346266336665656333656637343436343235383265383939306363636465383733373339 +64353530373833626539363231343435643166643762633665356232626637623133656338366364 +34323930353761343933636537393732336366386161643731656133613039343565633563363932 +38303637633136666431323062633635353464313965623634656535333864366264323135666431 +30313939663562653965353038393161306464343366316632663464366533656534613666376439 +66613839393761643166613736626264383263346134336139346465313037386237313033623934 +63633037643830633735643763313737316564666537343135386639383139366334396238363361 +33373535386130393065383832353165383436333134393961623938346164346236343862613863 +34636632623766643561333038386534383234326638346534616363303961653039666263666334 +34643936346464383333663935373166313563666562616239316436636131393336396661643037 +31393136616566646435613637333836653633633435393866663564313730333866623532393662 +33366634333532396162636333356431383862646434626530623436626363366363306265323839 +32336164313663363937646136656234313930636134393434396637613566643239353436393532 +38636164666334623264343031626265376430616363643236623536306138303333323837346233 +36316233643365383062376332366138393339653066656430333962353430646363666166663938 +62623635316665363034663466656331643633353034656236653230323835363762323861643936 +37356561356636316563323965653530636532643531613035623461666333363166663962613663 +32623431306466353866336237646163313262613235326266643362306137363466333433623136 +61616565636362653234636234396230643330333632616138373332616534613035326230316361 +34393832666433306530613831313563653533373236363962616636613231306262633433353632 +34643064666235633663663532306233303035393031633166323532376638306165386365643734 +35663330663335313938333839353662346163656434666435353965646461396233356132353733 +31626337376434303132646533316230333739303335386335333838373036633332653130663433 +63356261333134656234663261306336616661396132393562353233653839386438303264653337 +63313465343563623837636533346466343032343765366566396136633031653937343166616163 +35643665633637643361376134333932653639396136653534373331376438663633353863363637 +38333532343566303862323635306531613138333535353132323833303634343335623739353331 +39636131386437316534373236363332653064373433346164313561353163386536343838356265 +62313061383934623038343339323664313038653139646666306531373934643032643631363064 +32626533616539653565643331616536633633613038303839333230636133626439316432646339 +36393737383963303466666334326464306362393464323530356565646637356331643635303964 +30653439343735616434366338383631626538323965323732363532333137386465363637636632 +33393062643536366334633734336234633435643030393661353265646566623365323265343966 +36313536333637636433376330343362646134653337633964393939323334383530313934616465 +30643632396333353133343237316632613435316432643231393334393538333633643433393337 +63636465346364656230316666316137336333383565363731306464316364656433386539343063 +31343635333763613732343634383766353462393636383037656464323966666635623965313331 +66663865346233663162313162666334306563303763333430626162646537353733326132366637 +37313935316465626661616636613264343637316533626239303265626138653534643035376564 +64383137663833613365393032323663343039363838353164376465313130663265393439343061 +36373033666335333131666364343662386266656364303537336662396534653062333036653463 +31636336343131633766386431626238623231323233323863663138346661346231646564343733 +39323362656430653063623037343664306138376630333362326664353166613234653565323732 +35356363386262363030613561336565373033393432653364623138656261633439336332316638 +32316261333964343262353064306561373163626234396538643530356563356230323362633333 +65373737333061666639323630316330313038303466643239333838356665643431386530663661 +33666666623465633433353063356234373132396463386266623230626465366336653733316139 +31623166346538353264316132303435623561366230316462303932643831633838363237666565 +32346537373566653533373062343331303332613565666630353936303064663632303134366137 +37363131336435343638386261623666626432383235656436356531316236303737663739613639 +64663163643933373338303661636666613637316332633234343461323833626464616438323833 +33666664623164663330613532376535313237313465633161613763306133363639646562353262 +64396631343835326161343733613739303337363939336661323233303939393865656132366231 +34653965646130313033343632323331633236306662353662346233306465303731356332363235 +37396134366338623537366632333966633733316437333436366136306463663465303735326335 +32626132383732316333323863633061313434313366343065313561663935306235633237333831 +66626432656533643335393938663232633462356637323861336161303635313162663962356537 +63626266393966356164653562643535376666393439303364663132656135346331306236396533 +38386165386333663134313965393832386363316161363339323164666661653634633934663061 +32333339316338346161386636303539613839306135363665656430373865373834303663313735 +38656637306164306136343336376333353864303965633439666365343834373564383732663538 +30623836636339636437316639643533653233343432363764356363656536303335663332323038 +39656163616530666438373834323939396231313862666138393762653635376433316334626363 +34633563366262343865653034333862303962343266653064336265643031386663323632346231 +63336463663032643361373263636333643132343230336136323864326338613030333931363838 +37356631366430646262353261643234333235623136646239306238333832386162626330616163 +64303232643631666265363735353465363535363630373536343334633137376262613766326164 +31653931373465646131633766323031636231396564356165626238356439323939663831353361 +31356637313039343762306338616237353235373032616133316638613733366237323865633464 +38663136313530643335386164646335363835353962333161616366613966323933323761663434 +33613634613766306665646361343465396230303331666664646465333034613265353532323430 +33666261336265363639646264373164656561623034653032326539316464653433366438353832 +61346161323632643533626530626234303961346535353531666533393834303562306631316663 +35663766616662626265613330626261396265386566313735343865316261323162643333316639 +61376630383264343231653263373136666139373530356639353035323061636138313239613932 +61393132363366323632313734643337326230393835316237613031313762333835343432366338 +64303530343532653862646438303139613461636633653938393536356438316561333436616639 +39343264643465353633323735363764333063633630633965366262663066356133393739353366 +32616139343438643031363963623334643733653135653033633232626339326364313164363337 +66396339643833613139346637643037376438643632356335633430653035653631366630663231 +32363533333539313032663762386661396233336333336234303031343564343831643165633065 +61323435396236316630353739663466376433663037383533646437326138363837663265396533 +65646564663866393938343138396335303666313761663436373562653631313361653163643037 +32613336336265646465383736343837393637646538656239363962323366313037326230363235 +65336362336632323836343332626436623438623737643864383636646664366262663764343263 +66653865353830353939376530336436373931306262666337353937626333316434323263366562 +31373465326439323861343839636133353632626631653734653330653238323736333137366231 +39373465383166373833383561666134663136303032653431613965353432626563323263616231 +38373661353636623632663639353165316330333636666635393730333061313162653332633731 +62363634353833336463356663326431383436356262633762373834656362343134373864616333 +65393035336633343266343632303432306136636237346430613335623666333166653930303865 +34396530383137383265376431333933626230373139626237643164306635353061363536626336 +38383932393638383062323166643363383335623338613064643334313039303230633166353966 +64363366646166353363333465623365366438393361666636306363303238303066343135366565 +31363364613236376139636132313335653532646461363562343133393963636139303430386364 +30393362346363633166353061333831633961633964626234663765643637353937646133346338 +62306331356264353835633962393031333663383632356331396230306663353536616434633436 +62383137393663306132636530386639373835393631363935393361373837336534613863393330 +38353264336534386437373966396133643733343637363638336636306665666339316231386165 +39313666303665653264353666663464323666636263323365393166353531353533386162653333 +37303963643933363763346664356461353330663135303365396263373435663639333263383636 +34393534326666373966373136303838643135623033313730363236376330653834323034323030 +32323134306238393938643236373163396436393330393435336364633737306265323131393865 +62393236353465646531633462393138363931373531363566636135313334343861643232616266 +37646166363535376230316536396230376532346464313962653931623935353966373165316462 +31616339623636316233623361373639323865366539653538633039646364376166343134366264 +38363635326231313861336262666464636263343830393235316565333266313935313930626438 +36346463363335653636383136396530366234383037373466326334366137373062326362366366 +37393063313532336334636230303064643764353065326566373138336435643234353734623166 +63373532666434393638613039396362656364343139303261393865343739616537666265626264 +62383862343736373966333564646237373864333662346335643163633030303835633162366433 +63383931653362363333656365613636383639666563633666306335396630323761353564633337 +33653439373463373537653265393465663564323861316364343134376365666132333262653132 +66613266396332633963383631633734633938396564396233633133323934373765313738343736 +61323536346535366535366237373862633930353362633434363138383237393536356164663333 +38356539336363353464336265623538623564626266393865363565346536653564653331643766 +34346561343134366339336534386466316462646434373266386133393162393635363432613664 +62303632333764386534366262356461663838623031626363303233623063343462326437366339 +37373461366262396435663863316166383161383765323661626265323738393863383035373130 +62323530313035653839643565306137343364353831663662376439396464346530613731306630 +34323266316466623039303232383533363462616166303537653839363335356533393138613061 +39333436663964363138336164393430386661643365343736663931616263633538306338633362 +32363863336462376535353136336637313331373030346434613338343663366465633134346432 +32633637383135306437343361383965623965323331666138353563623766633732333731333736 +34353032383033653036386437663964373835613237663535373863613732653666623465393565 +62313961356139373739353638313033663663323331393431396461643662313030393539356530 +34326338353932323235313066643832363531306162333264616262636163643162343433643435 +39663361386638323762353236623461623466306538613866376138356463633137653734343233 +31623832623635316236613636613338313563313866656333623735626466663837343161616363 +37663632366366623539346631613839383830383739623062383734623365636137333136343332 +31393935333438646331366164353566396661623330633531393365396230353562656133623762 +64313431333365323165396235613566343263633464353732323264343163343762303061383836 +62663736613263353637623734366633303863373733306462616638306332653535643637343330 +65303466336439373863653039383337386136653837363466626635393666633437656562316635 +35383261393037313762303838353366636661363938323933623038656162383430396330373632 +38616462373232353530393739653765653037653461323532323232373365663732313230613131 +31663738323033366164633836323532623832646533633839383339636364373539393662323732 +34383462306664386166373265313030663533383538313435323763303866646562373630373162 +63306234393066356634623065346337343438336461653236306332326335356635633261353637 +62366134643033376666643163353463653066333239316138633932306136666466333266633639 +66386264383635306463663232623438356431343833303464333663363763373238366236333338 +63353961393033346163356330366261623937626237343939666465626439343835343232353337 +62666438653832646232336262353134656636666130346363386161336466663530663963366465 +36396338356661626532323532343165343035646361633966643133636433303735393938376564 +65303865366433306534633066666661326634626535343866663531313032303538323164633539 +63353761613439653264346365343763306634656338613136386261376339653739623063376137 +32366162663031633365363433393732363133393133333537313162656534363161663365353865 +39336131353863356664393063666131336638356264653936623235353939653233316633633433 +61626331616334353232343561616530653031323932386564363661386566653865396535366334 +65373162376234303630653663626138643761663061306134656433363663376462306438646132 +65646137303666326663333931333563316431356362356563373832653838343733653835376464 +32643763343766383865393666396430336435396436336131663366656662303063643830643036 +32376231613063393734393235623131663461323461633830666637373264343962396136326637 +36653538363837623166303139343363393630663865313933633133393330356630643563303530 +61333366313038613230646266653137306363366139633563636163356662653833653032366134 +36643836336465653735633531393866636465636633613132646437383562343632356163306165 +39623362643437656236346632333435316534633666326230663266613837613966373738666663 +62396337343062323537383034333739623030666639663266363831393634666463646332303030 +32623265636639356665626537646164653631393231643462613866316230333866626166346237 +64393839663032333862323838386431626633663436633333303433633063636430343330353833 +31383636663935666634393333653532643762366636663864333838376237303031346166393333 +34633836383336346630376237373534396364313764303237336532643465383333626530623465 +37316335343538363263646366363538616663656535623134663663343335326261353938623731 +38353862366638313664346366353364326330323535643461393739623738666230326464613066 +36303063656433613165623363346462356435343764383338633332666662656636366332653163 +61343836333931666464303231613933653039306564326430363263653539363937663164663461 +37626531323535323435393636366666333734636337653134393537616230326664643939383137 +3734 diff --git a/tasks/codeserver.yml b/tasks/codeserver.yml new file mode 100644 index 0000000..775ff43 --- /dev/null +++ b/tasks/codeserver.yml @@ -0,0 +1,25 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/code-server" + +- name: Create Code Server Docker Container + docker_container: + name: codeserver + image: lscr.io/linuxserver/code-server:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/code-server:/config" + - "/storage-pool/iac/containers:/config/workspace/docker" + env: + PROXY_DOMAIN: "{{ CODE_PROXY_DOMAIN }}" + DEFAULT_WORKSPACE: "{{ CODE_DEFAULT_WORKSPACE }}" + TZ: "{{ TZ }}" + PUID: "{{ PUID }}" + PGID: "{{ PGID }}" diff --git a/tasks/cup.yml b/tasks/cup.yml new file mode 100644 index 0000000..1465f3b --- /dev/null +++ b/tasks/cup.yml @@ -0,0 +1,12 @@ +--- +- name: Create Cup Docker Container + docker_container: + name: Cup + image: ghcr.io/sergi0g/cup + command: serve + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" diff --git a/tasks/dashdot.yml b/tasks/dashdot.yml new file mode 100644 index 0000000..76f1328 --- /dev/null +++ b/tasks/dashdot.yml @@ -0,0 +1,11 @@ +--- +- name: Create Dashdot Docker Container + docker_container: + name: dashdot + image: mauricenino/dashdot + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "/:/mnt/host:ro" diff --git a/tasks/dozzle.yml b/tasks/dozzle.yml new file mode 100644 index 0000000..5f98938 --- /dev/null +++ b/tasks/dozzle.yml @@ -0,0 +1,14 @@ +--- +- name: Create Dozzle Docker Container + docker_container: + name: dozzle + image: amir20/dozzle:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + env: + DOZZLE_ENABLE_ACTIONS: "{{ DOZZLE_ACTIONS }}" + DOZZLE_ENABLE_SHELL: "{{ DOZZLE_SHELL }}" diff --git a/tasks/excalidraw.yml b/tasks/excalidraw.yml new file mode 100644 index 0000000..265a603 --- /dev/null +++ b/tasks/excalidraw.yml @@ -0,0 +1,9 @@ +--- +- name: Create Excalidraw Docker Container + docker_container: + name: excalidraw + image: excalidraw/excalidraw + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab diff --git a/tasks/glance.yml b/tasks/glance.yml new file mode 100644 index 0000000..4b38a0f --- /dev/null +++ b/tasks/glance.yml @@ -0,0 +1,27 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/glance" + - "{{ data_dir }}/glance/config" + - "{{ data_dir }}/glance/assets" + +- name: Create Glance Docker Container + docker_container: + name: glance + image: glanceapp/glance + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + env: + PIHOLE_TOKEN: "{{ GLANCE_PIHOLE_TOKEN }}" + VIDEO_MACHINE: "{{ GLANCE_VIDEO_MACHINE }}" + JELLYFIN_URL: "{{ GLANCE_JELLYFIN_URL }}" + JELLYFIN_TOKEN: "{{ GLANCE_JELLYFIN_TOKEN }}" + volumes: + - "{{ data_dir }}/glance/config:/app/config" + - "{{ data_dir }}/glance/assets:/app/assets" + - "/var/run/docker.sock:/var/run/docker.sock:ro" diff --git a/tasks/homebridge.yml b/tasks/homebridge.yml new file mode 100644 index 0000000..e748b89 --- /dev/null +++ b/tasks/homebridge.yml @@ -0,0 +1,17 @@ +--- +- name: Create Folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/homebridge" + +- name: Create Homebridge Docker Container + docker_container: + name: homebridge + image: homebridge/homebridge:latest + restart_policy: unless-stopped + network_mode: host + recreate: true + volumes: + - "{{ data_dir }}/homebridge:/homebridge" diff --git a/tasks/immich.yml b/tasks/immich.yml new file mode 100644 index 0000000..f40e028 --- /dev/null +++ b/tasks/immich.yml @@ -0,0 +1,61 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/immich" + - "{{ data_dir }}/immich/model-cache" + - "{{ data_dir }}/immich/db" + +- name: Create Immich Redis Docker Container + docker_container: + name: immich_redis + image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884 + restart_policy: unless-stopped + recreate: true + networks: + - name: immich + +- name: Create Immich DB Docker Container + docker_container: + name: immich_postgres + image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0 + restart_policy: unless-stopped + recreate: true + volumes: + - "{{ data_dir }}/immich/db:/var/lib/postgresql/data" + env: + POSTGRES_PASSWORD: "{{ IMMICH_DB_PASSWORD }}" + POSTGRES_USER: "{{ IMMICH_DB_USERNAME }}" + POSTGRES_DB: "{{ IMMICH_DB_DATABASE_NAME }}" + POSTGRES_INITDB_ARGS: "--data-checksums" + networks: + - name: immich + +- name: Create Immich ML Docker Container + docker_container: + name: immich_machine_learning + image: ghcr.io/immich-app/immich-machine-learning:release + restart_policy: unless-stopped + recreate: true + volumes: + - "{{ data_dir }}/immich/model-cache:/cache" + networks: + - name: immich + +- name: Create Immich Server Docker Container + docker_container: + name: immich_server + image: ghcr.io/immich-app/immich-server:release + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + - name: immich + volumes: + - "{{ IMMICH_UPLOAD_LOCATION }}:/usr/src/app/upload" + - "/etc/localtime:/etc/localtime:ro" + env: + DOZZLE_ENABLE_ACTIONS: "{{ DOZZLE_ACTIONS }}" + DOZZLE_ENABLE_SHELL: "{{ DOZZLE_SHELL }}" diff --git a/tasks/nextcloud.yml b/tasks/nextcloud.yml new file mode 100644 index 0000000..a8141dd --- /dev/null +++ b/tasks/nextcloud.yml @@ -0,0 +1,38 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/nextcloud" + - "{{ data_dir }}/nextcloud/data" + - "{{ data_dir }}/nextcloud/db" + +- name: Create Nextcloud DB Docker Container + docker_container: + name: nc_postgresql + image: postgres:16-alpine + restart_policy: unless-stopped + recreate: true + networks: + - name: nextcloud + volumes: + - "{{ data_dir }}/nextcloud/db:/var/lib/postgresql/data" + env: + PGDATA: /var/lib/postgresql/data/pgdata + POSTGRES_PASSWORD: "{{ NEXTCLOUD_POSTGRES_PASSWORD }}" + POSTGRES_DATABASE: "{{ NEXTCLOUD_POSTGRES_DATABASE }}" + POSTGRES_USER: "{{ NEXTCLOUD_POSTGRES_USER }}" + POSTGRES_HOST: "{{ NEXTCLOUD_POSTGRES_HOST }}" + +- name: Create Nextcloud Docker Container + docker_container: + name: nextcloud + image: nextcloud + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + - name: nextcloud + volumes: + - "{{ data_dir }}/nextcloud/data:/var/www/html" diff --git a/tasks/ntfy.yml b/tasks/ntfy.yml new file mode 100644 index 0000000..5ab5b82 --- /dev/null +++ b/tasks/ntfy.yml @@ -0,0 +1,25 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/ntfy" + - "{{ data_dir }}/ntfy/cache" + - "{{ data_dir }}/ntfy/data" + +- name: Create Ntfy Docker Container + docker_container: + name: ntfy + image: binwiederhier/ntfy + command: serve + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/ntfy/cache:/var/cache/ntfy" + - "{{ data_dir }}/ntfy/data:/etc/ntfy" + env: + UPSTREAM_BASE_URL: "{{ NTFY_UPSTREAM_BASE_URL }}" + BASE_URL: "{{ NTFY_BASE_URL }}" diff --git a/tasks/nzbget.yml b/tasks/nzbget.yml new file mode 100644 index 0000000..5561ace --- /dev/null +++ b/tasks/nzbget.yml @@ -0,0 +1,25 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/nzbget" + +- name: Create NZBGet Docker Container + docker_container: + name: nzbget + image: lscr.io/linuxserver/nzbget:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/nzbget:/config" + - "{{ NZBGET_DOWNLOADS_PATH }}:/downloads" + env: + NZBGET_USER: "{{ NZBGET_USER }}" + NZBGET_PASS: "{{ NZBGET_PASS }}" + TZ: "{{ TZ }}" + PUID: "{{ PUID }}" + PGID: "{{ PGID }}" diff --git a/tasks/pihole.yml b/tasks/pihole.yml new file mode 100644 index 0000000..813fe81 --- /dev/null +++ b/tasks/pihole.yml @@ -0,0 +1,24 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/pihole" + +- name: Create PiHole Docker Container + docker_container: + name: pihole + image: pihole/pihole:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + published_ports: + - "{{ CADDY_HOST_IP }}:53:53/tcp" + - "{{ CADDY_HOST_IP }}:53:53/udp" + volumes: + - "{{ data_dir }}/pihole:/etc/pihole" + env: + FTLCONF_webserver_api_password: "{{ PIHOLE_FTLCONF_WEBSERVER_API_PASSWORD }}" + TZ: "{{ TZ }}" diff --git a/tasks/pocketid.yml b/tasks/pocketid.yml new file mode 100644 index 0000000..b6cfab9 --- /dev/null +++ b/tasks/pocketid.yml @@ -0,0 +1,18 @@ +--- +- name: Create Folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/pocketid" + +- name: Create PocketID Docker Container + docker_container: + name: pocketid + image: ghcr.io/pocket-id/pocket-id:v1 + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/pocketid:/app/data" diff --git a/tasks/romm.yml b/tasks/romm.yml new file mode 100644 index 0000000..f58e9cb --- /dev/null +++ b/tasks/romm.yml @@ -0,0 +1,63 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/romm" + - "{{ data_dir }}/romm/igdb" + - "{{ data_dir }}/romm/assets" + - "{{ data_dir }}/romm/config" + - "{{ data_dir }}/romm/db" + +- name: Create Romm DB Docker Container + docker_container: + name: romm-db + image: mariadb:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: romm + volumes: + - "{{ data_dir }}/romm/db:/var/lib/mysql" + env: + MARIADB_ROOT_PASSWORD: romm + MARIADB_DATABASE: romm + MARIADB_USER: romm-user + MARIADB_PASSWORD: romm + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + start_period: 30s + interval: 10s + timeout: 5s + retries: 5 + +- name: Create Romm Docker Container + docker_container: + name: romm + image: rommapp/romm:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + - name: romm + volumes: + - "{{ data_dir }}/romm/igdb:/romm/resources" + - "{{ data_dir }}/romm/redis:/redis-data" + - "{{ data_dir }}/romm/assets:/romm/assets" + - "{{ data_dir }}/romm/config:/romm/config" + - "{{ ROMM_LIBRARY_PATH }}:/romm/library" + env: + DB_HOST: romm-db + DB_NAME: romm + DB_USER: romm-user + DB_PASSWD: romm + AUTH_SECRET_KEY: "{{ ROMM_AUTH_SECRET_KEY }}" + IGDB_CLIENT_ID: "{{ ROMM_IGDB_CLIENT_ID }}" + IGDB_CLIENT_SECRET: "{{ ROMM_IGDB_CLIENT_SECRET }}" + OIDC_ENABLED: "{{ ROMM_OIDC_ENABLED }}" + OIDC_PROVIDER: "{{ ROMM_OIDC_PROVIDER }}" + OIDC_CLIENT_ID: "{{ ROMM_OIDC_CLIENT_ID }}" + OIDC_CLIENT_SECRET: "{{ ROMM_OIDC_CLIENT_SECRET }}" + OIDC_REDIRECT_URL: "{{ ROMM_OIDC_REDIRECT_URL }}" + SERVER_APPLICATION_URL: "{{ ROMM_SERVER_APPLICATION_URL }}" diff --git a/tasks/servarr.yml b/tasks/servarr.yml new file mode 100644 index 0000000..3fb1b7a --- /dev/null +++ b/tasks/servarr.yml @@ -0,0 +1,49 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/servarr" + - "{{ data_dir }}/servarr/sonarr_config" + - "{{ data_dir }}/servarr/radarr_config" + - "{{ data_dir }}/servarr/lidarr_config" + +- name: Deploy Radarr Container + docker_container: + name: radarr + image: ghcr.io/hotio/radarr + restart_policy: unless-stopped + recreate: true + volumes: + - "{{ data_dir }}/servarr/radarr_config:/config" + - "{{ SERVARR_MEDIA_PATH }}:/media" + - "{{ NZBGET_DOWNLOADS_PATH }}:/downloads" + networks: + - name: homelab + +- name: Deploy Sonarr Container + docker_container: + name: sonarr + image: lscr.io/linuxserver/sonarr:latest + restart_policy: unless-stopped + recreate: true + volumes: + - "{{ data_dir }}/servarr/sonarr_config:/config" + - "{{ SERVARR_MEDIA_PATH }}:/media" + - "{{ NZBGET_DOWNLOADS_PATH }}:/downloads" + networks: + - name: homelab + +- name: Deploy Lidarr Container + docker_container: + name: lidarr + image: ghcr.io/hotio/lidarr + restart_policy: unless-stopped + recreate: true + volumes: + - "{{ data_dir }}/servarr/lidarr_config:/config" + - "{{ SERVARR_MEDIA_PATH }}:/media" + - "{{ NZBGET_DOWNLOADS_PATH }}:/downloads" + networks: + - name: homelab diff --git a/tasks/tautulli.yml b/tasks/tautulli.yml new file mode 100644 index 0000000..36f42c0 --- /dev/null +++ b/tasks/tautulli.yml @@ -0,0 +1,22 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/tautulli" + +- name: Create Tautulli Docker Container + docker_container: + name: tautulli + image: ghcr.io/tautulli/tautulli + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/tautulli:/config" + env: + PUID: "{{ PUID }}" + PGID: "{{ PGID }}" + TZ: "{{ TZ }}" diff --git a/tasks/tinyauth.yml b/tasks/tinyauth.yml new file mode 100644 index 0000000..127735b --- /dev/null +++ b/tasks/tinyauth.yml @@ -0,0 +1,23 @@ +--- +- name: Create Tinyauth Docker Container + docker_container: + name: tinyauth + image: ghcr.io/steveiliop56/tinyauth:v3 + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + env: + USERS: "{{ TINYAUTH_USERS }}" + SECRET: "{{ TINYAUTH_SECRET }}" + APP_URL: "{{ TINYAUTH_APP_URL }}" + GENERIC_CLIENT_ID: "{{ TINYAUTH_GENERIC_CLIENT_ID }}" + GENERIC_CLIENT_SECRET: "{{ TINYAUTH_GENERIC_CLIENT_SECRET }}" + GENERIC_AUTH_URL: "{{ TINYAUTH_GENERIC_AUTH_URL }}" + GENERIC_TOKEN_URL: "{{ TINYAUTH_GENERIC_TOKEN_URL }}" + GENERIC_USER_URL: "{{ TINYAUTH_GENERIC_USER_URL }}" + GENERIC_SCOPES: "{{ TINYAUTH_GENERIC_SCOPES }}" + GENERIC_NAME: "{{ TINYAUTH_GENERIC_NAME }}" + OAUTH_WHITELIST: "{{ TINYAUTH_OAUTH_WHITELIST }}" + APP_TITLE: "{{ TINYAUTH_APP_TITLE }}" + BACKGROUND_IMAGE: "{{ TINYAUTH_BACKGROUND_IMAGE }}" diff --git a/tasks/vaultwarden.yml b/tasks/vaultwarden.yml new file mode 100644 index 0000000..1d15c97 --- /dev/null +++ b/tasks/vaultwarden.yml @@ -0,0 +1,20 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/vaultwarden" + +- name: Create Vaultwarden Docker Container + docker_container: + name: vaultwarden + image: vaultwarden/server:latest + restart_policy: unless-stopped + recreate: true + networks: + - name: homelab + volumes: + - "{{ data_dir }}/vaultwarden:/data" + env: + DOMAIN: "{{ VAULTWARDEN_DOMAIN }}"